diff options
author | Miss Islington (bot) <31488909+miss-islington@users.noreply.github.com> | 2021-10-29 13:42:38 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-10-29 22:42:38 +0200 |
commit | e1560313d4d9bff8eba0f851ef325f7ee19f7ba9 (patch) | |
tree | 13f1c504729416c6386af897e7a46fd32be43b63 | |
parent | 317e0c99e3804310f4bee23e497d9d84b717d7f7 (diff) | |
download | cpython-git-e1560313d4d9bff8eba0f851ef325f7ee19f7ba9.tar.gz |
bpo-45335: Add note to `sqlite3` docs about "timestamp" converter (GH-29200) (GH-29320)
(cherry picked from commit 3877fc02f7a8801ba5ce0e94b6075b3fdd9778d0)
Co-authored-by: Ian Fisher <ian@iafisher.com>
-rw-r--r-- | Doc/library/sqlite3.rst | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/Doc/library/sqlite3.rst b/Doc/library/sqlite3.rst index b9436daaeb..b24a2f0985 100644 --- a/Doc/library/sqlite3.rst +++ b/Doc/library/sqlite3.rst @@ -1062,6 +1062,12 @@ If a timestamp stored in SQLite has a fractional part longer than 6 numbers, its value will be truncated to microsecond precision by the timestamp converter. +.. note:: + + The default "timestamp" converter ignores UTC offsets in the database and + always returns a naive :class:`datetime.datetime` object. To preserve UTC + offsets in timestamps, either leave converters disabled, or register an + offset-aware converter with :func:`register_converter`. .. _sqlite3-controlling-transactions: |