Skip to content

Commit b1b563b

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

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

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)