Skip to content

Commit cd685a7

Browse files
NekrodNIKPranjal095
authored andcommitted
pythongh-131825: Fix sqlite3 timezone-naive adapter recipe (pythonGH-136270)
1 parent 20f8926 commit cd685a7

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)