#17213: Can't change TIME_ZONE after initial transaction in PostgreSQL
-------------------------------------+-------------------------------------
     Reporter:  calvinspealman       |                    Owner:  nobody
         Type:  Bug                  |                   Status:  closed
    Component:  Database layer       |                  Version:  SVN
  (models, ORM)                      |               Resolution:  wontfix
     Severity:  Normal               |             Triage Stage:
     Keywords:                       |  Unreviewed
    Has patch:  1                    |      Needs documentation:  0
  Needs tests:  0                    |  Patch needs improvement:  0
Easy pickings:  0                    |                    UI/UX:  0
-------------------------------------+-------------------------------------

Comment (by aaugustin):

 The [https://docs.djangoproject.com/en/dev/ref/signals/#connection-created
 connection_created] signal may be useful in you want to change the time
 zone on a per-request basis.

 I think setting `TIME_ZONE = None` in the settings file and executing `SET
 TIME ZONE` in a signal receiver should work. That function will have to
 look up the time zone in a global (thread-local) variable.

-- 
Ticket URL: <https://code.djangoproject.com/ticket/17213#comment:6>
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 post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/django-updates?hl=en.

Reply via email to