From: Miss Islington (bot) <31488909+miss-islington@users.noreply.github.com> Date: Wed, 9 Jul 2025 14:12:47 +0000 (+0200) Subject: [3.14] gh-131825: Fix `sqlite3` timezone-naive adapter recipe (GH-136270) (GH-136467) X-Git-Tag: v3.14.0rc1~111 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=75640d4b1f65b316089f294c93745febabeffc87;p=thirdparty%2FPython%2Fcpython.git [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 6a6cd3c07c0300c8799878a48d555470be2a52f7) Co-authored-by: NekrodNIK <60639354+NekrodNIK@users.noreply.github.com> --- diff --git a/Doc/library/sqlite3.rst b/Doc/library/sqlite3.rst index e2726e53f09c..e939e61a9676 100644 --- a/Doc/library/sqlite3.rst +++ b/Doc/library/sqlite3.rst @@ -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."""