[Fixed]-Time zone issue with Django

1👍

UTC it’s just fine. You should store timezones as UTC and then depending of your user’s timezone/app settings timezone, convert it.

It could be a mess if you store different timezones in your database.

When you set USE_TZ = True. Django stores date’s timezone as UTC in the database. Then, depending on what timezone settings you have in Django, It will convert dates automatically from stored UTC dates.

If you set USE_TZ = False. Django will store dates as naive representation.

👤levi

Leave a comment