#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
-------------------------------------+-------------------------------------

Comment (by lobziik):

 Replying to [comment:4 Tim Graham]:
 > It looks to me like
 
[https://github.com/django/django/blob/ba83378a7762c51be235b521aa5b48233d6c6c82/django/db/backends/postgresql/base.py#L193-L201
 the time zone is set if needed].
 
[https://github.com/django/django/blob/ba83378a7762c51be235b521aa5b48233d6c6c82/django/db/backends/base/base.py#L135-L145
 The code] matches the documentation you quoted as far as I see.

 timezone_name looks broken for me...
 If settings.TIME_ZONE is True, UTC returns
 
[https://github.com/django/django/blob/ba83378a7762c51be235b521aa5b48233d6c6c82/django/db/backends/base/base.py#L143
 here]
 If TIME_ZONE presented in database settings it will cause the
 ImproperlyConfigured exception
 
[https://github.com/django/django/blob/ba83378a7762c51be235b521aa5b48233d6c6c82/django/db/backends/base/base.py#L207
 here].

 Should we patch
 
[https://github.com/django/django/blob/ba83378a7762c51be235b521aa5b48233d6c6c82/django/db/backends/base/base.py#L140
 this] if statement and remove not there? Or redefine this method in
 {{{postgresql.base.DatabaseWrapper}}}.

-- 
Ticket URL: <https://code.djangoproject.com/ticket/29580#comment:5>
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.ac33cd4474f89ae228ac2f7da4ddc149%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to