[3.13] gh-131825: Fix sqlite3 timezone-naive adapter recipe (GH-136270) (GH-136468)

gh-131825: Fix `sqlite3` timezone-naive adapter recipe (GH-136270)
(cherry picked from commit 6a6cd3c07c)

Co-authored-by: NekrodNIK <60639354+NekrodNIK@users.noreply.github.com>
This commit is contained in:
Miss Islington (bot) 2025-07-09 16:13:02 +02:00 committed by GitHub
parent 7a548e26ac
commit 217638588f
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -2307,7 +2307,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."""