https://github.com/python/cpython/commit/6a6cd3c07c0300c8799878a48d555470be2a52f7
commit: 6a6cd3c07c0300c8799878a48d555470be2a52f7
branch: main
author: NekrodNIK <[email protected]>
committer: ZeroIntensity <[email protected]>
date: 2025-07-09T10:06:42-04:00
summary:

gh-131825: Fix `sqlite3` timezone-naive adapter recipe (GH-136270)

files:
M Doc/library/sqlite3.rst

diff --git a/Doc/library/sqlite3.rst b/Doc/library/sqlite3.rst
index 641e1f1de03a1d..a14af6d3d88df2 100644
--- a/Doc/library/sqlite3.rst
+++ b/Doc/library/sqlite3.rst
@@ -2288,7 +2288,7 @@ This section shows recipes for common adapters and 
converters.
 
    def adapt_datetime_iso(val):
        """Adapt datetime.datetime to timezone-naive ISO 8601 date."""
-       return val.isoformat()
+       return val.replace(tzinfo=None).isoformat()
 
    def adapt_datetime_epoch(val):
        """Adapt datetime.datetime to Unix timestamp."""

_______________________________________________
Python-checkins mailing list -- [email protected]
To unsubscribe send an email to [email protected]
https://mail.python.org/mailman3//lists/python-checkins.python.org
Member address: [email protected]

Reply via email to