[Django]-Django – what timezone does auto_now use in a models.DateTimeField?

4👍

Django has a TIME_ZONE settings in the settings.py file which it uses in the runtime to handle any datetime object.

When USE_TZ is False, this is the time zone in which Django will store all datetimes. When USE_TZ is True, this is the default time zone that Django will use to display datetimes in templates and to interpret datetimes entered in forms.

So, you can set it to UTC as it’s one of the valid timezones.

Leave a comment