Skip to content

Commit 75640d4

Browse files
[3.14] gh-131825: Fix sqlite3 timezone-naive adapter recipe (GH-136270) (GH-136467)
gh-131825: Fix `sqlite3` timezone-naive adapter recipe (GH-136270) (cherry picked from commit 6a6cd3c) Co-authored-by: NekrodNIK <[email protected]>
1 parent 90717c2 commit 75640d4

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Doc/library/sqlite3.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2289,7 +2289,7 @@ This section shows recipes for common adapters and converters.
22892289

22902290
def adapt_datetime_iso(val):
22912291
"""Adapt datetime.datetime to timezone-naive ISO 8601 date."""
2292-
return val.isoformat()
2292+
return val.replace(tzinfo=None).isoformat()
22932293

22942294
def adapt_datetime_epoch(val):
22952295
"""Adapt datetime.datetime to Unix timestamp."""

0 commit comments

Comments
 (0)