#29580: Now() database function doesn't respect TIME_ZONE with USE_TZ
-------------------------------------+-------------------------------------
Reporter: lobziik | Owner: nobody
Type: Bug | Status: closed
Component: Database layer | Version: 2.0
(models, ORM) |
Severity: Normal | Resolution: invalid
Keywords: postgres, | Triage Stage:
postgresql, time zones, USE_TZ | Unreviewed
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by Tim Graham):
* status: new => closed
* resolution: => invalid
Comment:
I don't see anything in [https://docs.djangoproject.com/en/dev/ref/models
/database-functions/#now the documentation] for the `Now` database
function that suggests that `settings.TIME_ZONE` should be respected:
"Returns the database server’s current date and time when the query is
executed".
From the [https://docs.djangoproject.com/en/dev/topics/i18n/timezones/
time zone documentation], "When support for time zones is enabled, Django
stores datetime information in UTC in the database, uses time-zone-aware
datetime objects internally, and translates them to the end user’s time
zone in templates and forms."
--
Ticket URL: <https://code.djangoproject.com/ticket/29580#comment:2>
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/065.bea4d6a647b073935b8b11222e0835d3%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.