Skip to content

Commit 3877fc0

Browse files
authored
bpo-45335: Add note to sqlite3 docs about "timestamp" converter (GH-29200)
1 parent f0150ac commit 3877fc0

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

Doc/library/sqlite3.rst

+6
Original file line numberDiff line numberDiff line change
@@ -1095,6 +1095,12 @@ If a timestamp stored in SQLite has a fractional part longer than 6
10951095
numbers, its value will be truncated to microsecond precision by the
10961096
timestamp converter.
10971097

1098+
.. note::
1099+
1100+
The default "timestamp" converter ignores UTC offsets in the database and
1101+
always returns a naive :class:`datetime.datetime` object. To preserve UTC
1102+
offsets in timestamps, either leave converters disabled, or register an
1103+
offset-aware converter with :func:`register_converter`.
10981104

10991105
.. _sqlite3-controlling-transactions:
11001106

0 commit comments

Comments
 (0)