#30638: Allow the per-database TIME_ZONE option on databases that support
timezones
-------------------------------------+-------------------------------------
Reporter: Aymeric | Owner: nobody
Augustin |
Type: New | Status: new
feature |
Component: Database | Version: 2.2
layer (models, ORM) |
Severity: Normal | Keywords:
Triage Stage: | Has patch: 0
Unreviewed |
Needs documentation: 0 | Needs tests: 0
Patch needs improvement: 0 | Easy pickings: 0
UI/UX: 0 |
-------------------------------------+-------------------------------------
I have a Django project that connects to a third-party PostgreSQL database
(actually, Redshift, but that's the same as PostgreSQL for the purpose of
this ticket).
I do not control the scheme of that database. It uses `timestamp`
(timezone naive) values in UTC for datetimes rather than `timestamp with
time zone` (timezone aware).
Django reads naive datetimes in UTC from this database and assumes they're
in Europe/Paris (my global TIME_ZONE setting) so they're off by 2 hours in
the admin.
I would like to set the `TIME_ZONE` option for this database connection to
`UTC` in order to read and write naive datetimes in UTC rather than
Europe/Paris.
Unfortunately:
> When USE_TZ is True and the database supports time zones (e.g.
PostgreSQL), it is an error to set this option.
I think it should be allowed.
--
Ticket URL: <https://code.djangoproject.com/ticket/30638>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
--
You received this message because you are subscribed to the Google Groups
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/django-updates/052.358e46124ccddcc56509a2a86f908f3e%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.