Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
bpo-45335: Add note to sqlite3 docs about "timestamp" converter (GH…
…-29200)

(cherry picked from commit 3877fc0)

Co-authored-by: Ian Fisher <ian@iafisher.com>
  • Loading branch information
iafisher authored and miss-islington committed Oct 29, 2021
commit ef4f47f5d9d9ae6c88e2be18141b64e22f89de81
6 changes: 6 additions & 0 deletions Doc/library/sqlite3.rst
Original file line number Diff line number Diff line change
Expand Up @@ -1062,6 +1062,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