Message402979
The SQLite converter that the sqlite3 library automatically registers for TIMESTAMP columns (https://github.com/python/cpython/blob/main/Lib/sqlite3/dbapi2.py#L66) ignores the time zone even if it is present and always returns a naive datetime object.
I think that the converter should return an aware object if the time zone is present in the database. As it is, round trips of TIMESTAMP values from the database to Python and back might erase the original time zone info.
Now that datetime.datetime.fromisoformat is in Python 3.7, this should be easy to implement. |
|
Date |
User |
Action |
Args |
2021-09-30 19:37:28 | iafisher | set | recipients:
+ iafisher |
2021-09-30 19:37:28 | iafisher | set | messageid: <1633030648.15.0.389354245942.issue45335@roundup.psfhosted.org> |
2021-09-30 19:37:28 | iafisher | link | issue45335 messages |
2021-09-30 19:37:28 | iafisher | create | |
|