bpo-45335: Add note to sqlite3 docs about "timestamp" converter (GH… · python/cpython@8ea665c (original) (raw)

Original file line number Diff line number Diff line change
@@ -1072,6 +1072,12 @@ If a timestamp stored in SQLite has a fractional part longer than 6
1072 1072 numbers, its value will be truncated to microsecond precision by the
1073 1073 timestamp converter.
1074 1074
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`.
1075 1081
1076 1082 .. _sqlite3-controlling-transactions:
1077 1083