Skip to content

Commit 8ea665c

Browse files
bpo-45335: Add note to sqlite3 docs about "timestamp" converter (GH-29200) (GH-29319)
(cherry picked from commit 3877fc0) Co-authored-by: Ian Fisher <ian@iafisher.com>
1 parent d8ca47c commit 8ea665c

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
@@ -1072,6 +1072,12 @@ If a timestamp stored in SQLite has a fractional part longer than 6
10721072
numbers, its value will be truncated to microsecond precision by the
10731073
timestamp converter.
10741074

1075+
.. note::
1076+
1077+
The default "timestamp" converter ignores UTC offsets in the database and
1078+
always returns a naive :class:`datetime.datetime` object. To preserve UTC
1079+
offsets in timestamps, either leave converters disabled, or register an
1080+
offset-aware converter with :func:`register_converter`.
10751081

10761082
.. _sqlite3-controlling-transactions:
10771083

0 commit comments

Comments
 (0)