First is first, ensure that USE_TZ = True
in your settings.py
file. Also set a default time zone value to TIME_ZONE
such as TIME_ZONE='UTC'
. View a complete list of timezones here.
If USE_TZ
is False, TIME_ZONE
will be the time zone that Django will use to store all datetimes. When USE_TZ
is enabled, TIME_ZONE
is the default time zone that Django will use to display datetimes in templates and to interpret datetimes entered in forms.
With time zone support enabled, django will store datetime
data in the database as the time zone UTC