#35240: Django doesn't set Postgres timezone to UTC when using psycopg3
-------------------------------+--------------------------------------
     Reporter:  Fabi           |                    Owner:  nobody
         Type:  Bug            |                   Status:  new
    Component:  Uncategorized  |                  Version:  4.2
     Severity:  Normal         |               Resolution:
     Keywords:                 |             Triage Stage:  Unreviewed
    Has patch:  0              |      Needs documentation:  0
  Needs tests:  0              |  Patch needs improvement:  0
Easy pickings:  0              |                    UI/UX:  0
-------------------------------+--------------------------------------
Changes (by Natalia Bidart):

 * cc: Mariusz Felisiak, Florian Apolloner, Simon Charette (added)

Comment:

 Hello Fabi, thank you for your report.

 Could you please provide details about your settings for `DATABASES`? From
 [https://docs.djangoproject.com/en/5.0/ref/settings/#time-zone these
 docs]:

 > TIME_ZONE
 > Default: None
 > A string representing the time zone for this database connection or None
 [...]
 > When USE_TZ is True, reading datetimes from the database returns aware
 datetimes with the timezone set to this option’s value if not None, or to
 UTC otherwise.

 Also, could you please try using latest Django 5.0 or from the `main`
 branch? Django 4.2 is not receiving bug fixes any more so we'd need to
 confirm is this is still an issue in newer/supported versions.

 In any case, it's unexpected (to me) that from the source links you
 provided, `get_adapters_template` takes two parameters `use_tz, timezone`
 but only `timezone` is used.
-- 
Ticket URL: <https://code.djangoproject.com/ticket/35240#comment:3>
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/0107018dc7f24a43-1c0963e9-d8fe-4247-8dcc-af799eb0add2-000000%40eu-central-1.amazonses.com.

Reply via email to