Skip to content

Commit 6a6cd3c

Browse files
authored
gh-131825: Fix sqlite3 timezone-naive adapter recipe (GH-136270)
1 parent 3c43df4 commit 6a6cd3c

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
@@ -2288,7 +2288,7 @@ This section shows recipes for common adapters and converters.
22882288

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

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

0 commit comments

Comments
 (0)