diff options
author | Ian Fisher <ian@iafisher.com> | 2021-10-29 20:17:22 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-10-29 20:17:22 (GMT) |
commit | 3877fc02f7a8801ba5ce0e94b6075b3fdd9778d0 (patch) | |
tree | 803b59e68a41474a60e011b5029220a6573d98f4 /Doc/library | |
parent | f0150ac94a85c863ec1dcb58b9e33ed7ce465ec8 (diff) | |
download | cpython-3877fc02f7a8801ba5ce0e94b6075b3fdd9778d0.zip cpython-3877fc02f7a8801ba5ce0e94b6075b3fdd9778d0.tar.gz cpython-3877fc02f7a8801ba5ce0e94b6075b3fdd9778d0.tar.bz2 |
bpo-45335: Add note to `sqlite3` docs about "timestamp" converter (GH-29200)
Diffstat (limited to 'Doc/library')
-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 fe1b64a..19a4155 100644 --- a/Doc/library/sqlite3.rst +++ b/Doc/library/sqlite3.rst @@ -1095,6 +1095,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: |