mirror of
https://github.com/python/cpython.git
synced 2025-12-23 09:19:18 +00:00
[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 6a6cd3c07c)
Co-authored-by: NekrodNIK <60639354+NekrodNIK@users.noreply.github.com>
This commit is contained in:
parent
90717c2cec
commit
75640d4b1f
1 changed files with 1 additions and 1 deletions
|
|
@ -2289,7 +2289,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