-
Notifications
You must be signed in to change notification settings - Fork 435
Open
Description
asyncpg converts timestamps to datetime.datetime. If a column has type timestamp without time zone then the datetime object's .tzinfo is None. This means datetime implicitly treats this datetime as if it is local, and source code has to replace tzinfo for every column that has timestamp without time zone.
I'd expect that when developers specify no timezone it is intended to be UTC, otherwise timezone would be specified in the postgres datatype?
With this in mind it makes sense to provide UTC timezone type when creating datetime.datetime objects from columns that do not specify timezone (at least IMO).
victor-torres
Metadata
Metadata
Assignees
Labels
No labels