#34202: Strict time zone name condition in PostgreSQL DatabaseWrapper.
-------------------------------------+-------------------------------------
               Reporter:  Alexander  |          Owner:  nobody
  Ebral                              |
                   Type:  Bug        |         Status:  new
              Component:  Database   |        Version:  4.1
  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          |
-------------------------------------+-------------------------------------
 DatabaseWrapper from
 
https://github.com/django/django/blob/main/django/db/backends/postgresql/base.py
 in function ''ensure_timezone'' checks that
 {{{
 conn_timezone_name != timezone_name
 }}}

 in our PostgreSQL config timezone was set to 'Etc/UTC' and in django was
 'UTC' (There is NO difference between UTC and Etc/UTC time zones:
 https://stackoverflow.com/questions/14128574/is-there-a-difference-
 between-the-utc-and-etc-utc-time-zones)
 which led to many unnecessary

 {{{
 set time zone 'UTC'
 }}}

 queries.
 Maybe we need to change this condition to some fuzzy form? Something like
 this?:

 {{{
 conn_timezone_name not in timezone_name and timezone_name not in
 conn_timezone_name
 }}}

-- 
Ticket URL: <https://code.djangoproject.com/ticket/34202>
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/01070184ed6628a1-62fe2126-fb8b-4c2b-a90a-898bf71ccdd0-000000%40eu-central-1.amazonses.com.

Reply via email to