mirror of
https://github.com/python/cpython.git
synced 2025-08-03 08:34:29 +00:00
[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:
parent
7a548e26ac
commit
217638588f
1 changed files with 1 additions and 1 deletions
|
@ -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."""
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue