Re: [Django] #35193: Range dumper assumes timezone aware datetimes. (was: Timezone unaware datetimes and psycopg 3)

3 views
Skip to first unread message

Django

unread,
Feb 14, 2024, 6:44:31 AMFeb 14
to django-...@googlegroups.com
#35193: Range dumper assumes timezone aware datetimes.
-------------------------------------+-------------------------------------
Reporter: Mapiarz | Owner: nobody
Type: Bug | Status: closed
Component: Database layer | Version: 4.2
(models, ORM) |
Severity: Normal | Resolution: invalid
Keywords: psycopg3 | Triage Stage:
| Unreviewed
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by Mariusz Felisiak):

* status: new => closed
* cc: Florian Apolloner (added)
* resolution: => invalid
* summary: Timezone unaware datetimes and psycopg 3 => Range dumper
assumes timezone aware datetimes.
* keywords: => psycopg3
* type: Uncategorized => Bug

Comment:

Thanks for the report. As far as I'm aware, there is no way in the dumper
to detect that you're using `tsrange` and change the behavior. You should
be able to use
[https://www.psycopg.org/psycopg3/docs/api/adapt.html#psycopg.adapt.AdaptersMap.register_dumper
register_dumper()] to override the dumper.
--
Ticket URL: <https://code.djangoproject.com/ticket/35193#comment:1>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

Reply all
Reply to author
Forward
0 new messages