From: Miss Islington (bot) <31488909+miss-islington@users.noreply.github.com> Date: Fri, 29 Oct 2021 20:41:45 +0000 (-0700) Subject: bpo-45335: Add note to `sqlite3` docs about "timestamp" converter (GH-29200) (GH... X-Git-Tag: v3.10.1~119 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=8ea665c730cd86a321c558c012bef84f454efa4f;p=thirdparty%2FPython%2Fcpython.git bpo-45335: Add note to `sqlite3` docs about "timestamp" converter (GH-29200) (GH-29319) (cherry picked from commit 3877fc02f7a8801ba5ce0e94b6075b3fdd9778d0) Co-authored-by: Ian Fisher --- diff --git a/Doc/library/sqlite3.rst b/Doc/library/sqlite3.rst index dc9aeb2ba3f5..16d2c2e85f42 100644 --- a/Doc/library/sqlite3.rst +++ b/Doc/library/sqlite3.rst @@ -1072,6 +1072,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: