]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
bpo-45335: Add note to `sqlite3` docs about "timestamp" converter (GH-29200)
authorIan Fisher <ian@iafisher.com>
Fri, 29 Oct 2021 20:17:22 +0000 (16:17 -0400)
committerGitHub <noreply@github.com>
Fri, 29 Oct 2021 20:17:22 +0000 (22:17 +0200)
Doc/library/sqlite3.rst

index fe1b64ade956129f605453cef8c1a69c3a221141..19a4155542382f61ef0e45563df55be41904e3d2 100644 (file)
@@ -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: