Skip to content

Commit

Permalink
bpo-45335: Add note to sqlite3 docs about "timestamp" converter (GH…
Browse files Browse the repository at this point in the history
  • Loading branch information
iafisher authored Oct 29, 2021
1 parent f0150ac commit 3877fc0
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions Doc/library/sqlite3.rst
Original file line number Diff line number Diff line change
Expand Up @@ -1095,6 +1095,12 @@ If a timestamp stored in SQLite has a fractional part longer than 6
numbers, its value will be truncated to microsecond precision by the
timestamp converter.

.. note::

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

.. _sqlite3-controlling-transactions:

Expand Down

0 comments on commit 3877fc0

Please sign in to comment.