This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author iafisher
Recipients iafisher
Date 2021-09-30.19:37:28
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1633030648.15.0.389354245942.issue45335@roundup.psfhosted.org>
In-reply-to
Content
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.
History
Date User Action Args
2021-09-30 19:37:28iafishersetrecipients: + iafisher
2021-09-30 19:37:28iafishersetmessageid: <1633030648.15.0.389354245942.issue45335@roundup.psfhosted.org>
2021-09-30 19:37:28iafisherlinkissue45335 messages
2021-09-30 19:37:28iafishercreate