Search
 
SCRIPT & CODE EXAMPLE
 

PYTHON

django import timezone

from django.utils import timezone

now = timezone.now()
Comment

how to set indian timezone in django

#Tested it's working modify into settings.py file
TIME_ZONE = 'Asia/Kolkata'
Comment

change django time zone

timezones = pytz.all_timezones

print(timezones)
OUTPUT
['Africa/Abidjan', 'Africa/Accra', 'Africa/Addis ... 'Universal', 'W-SU', 'WET', 'Zulu']
TIME_ZONE = "Africa/Abidjan"

print(TIME_ZONE)
OUTPUT
Africa/Abidjan
Comment

django timezone settings

Here is the list of valid timezones:

http://en.wikipedia.org/wiki/List_of_tz_database_time_zones

You can use

TIME_ZONE = 'Europe/Istanbul'
for UTC+02:00
Comment

PREVIOUS NEXT
Code Example
Python :: python dict for k v 
Python :: python print datetime 
Python :: button in python 
Python :: one line if statement no else 
Python :: list of python keywords 
Python :: give a function a name python 
Python :: python how to make multiple box plots 
Python :: qfiledialog python save 
Python :: how to make a multiple choice quiz in python with tkinter 
Python :: create virtual environments python 
Python :: python how to count items in array 
Python :: re.compile example 
Python :: get index of value in list if value meet condition python 
Python :: how to remove duplicates from a python list 
Python :: how to run python module every 10 sec 
Python :: [0] * 10 python 
Python :: how to put a image in flask 
Python :: max pooling in cnn 
Python :: tuple plot python 
Python :: Load dataset from seaborn 
Python :: google translator api pyhton 
Python :: midpoint 
Python :: python venv activate 
Python :: django prefetch_related vs select_related 
Python :: selenium select element by id 
Python :: split at the second occurrence of the element python 
Python :: download from colab to local drive 
Python :: matplotlib pyplot comment on plot 
Python :: data normalization python 
Python :: list exclude list 
ADD CONTENT
Topic
Content
Source link
Name
1+4 =