Skip to content

Commit e156031

Browse files
bpo-45335: Add note to sqlite3 docs about "timestamp" converter (GH-29200) (GH-29320)
(cherry picked from commit 3877fc0) Co-authored-by: Ian Fisher <[email protected]>
1 parent 317e0c9 commit e156031

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

Doc/library/sqlite3.rst

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1062,6 +1062,12 @@ If a timestamp stored in SQLite has a fractional part longer than 6
10621062
numbers, its value will be truncated to microsecond precision by the
10631063
timestamp converter.
10641064

1065+
.. note::
1066+
1067+
The default "timestamp" converter ignores UTC offsets in the database and
1068+
always returns a naive :class:`datetime.datetime` object. To preserve UTC
1069+
offsets in timestamps, either leave converters disabled, or register an
1070+
offset-aware converter with :func:`register_converter`.
10651071

10661072
.. _sqlite3-controlling-transactions:
10671073

0 commit comments

Comments
 (0)