Here is what I am trying to do:
- I want datetimes to be stored in UTC in the database.
- I want them to be displayed in the US/Eastern timezone for the admin.
- Each user has a field for the timezone so I'd like to display the times for their timezone when they are connected.
I started with that in the settings.py file:
LANGUAGE_CODE = 'en-us'
TIME_ZONE = 'US/Eastern'
USE_I18N = True
USE_L10N = True
USE_TZ = True
It looks like #1 and #2 are ok.
For #3, I tried using something like that in the templates to display the times with the user timezone but it does not seem to work.
{% load tz %}
{% timezone "Europe/Paris" %}
Paris time: {{ value }}
{% endtimezone %}