]> git.ipfire.org Git - thirdparty/sqlalchemy/sqlalchemy.git/commit
Pass all datetime values to pyodbc for timezone-naive column
authorMike Bayer <mike_mp@zzzcomputing.com>
Mon, 26 Apr 2021 23:17:06 +0000 (19:17 -0400)
committerMike Bayer <mike_mp@zzzcomputing.com>
Tue, 27 Apr 2021 00:49:38 +0000 (20:49 -0400)
commit802923062720589c0aea0d56a8672407be2cb79c
treeb69913d5e6bd93f2f89c5ac8372f34dbeb265305
parentcf329ec33153307968828b46a4466850ebcf374e
Pass all datetime values to pyodbc for timezone-naive column

Fixed regression caused by :ticket:`6306` which added support for
``DateTime(timezone=True)``, where the previous behavior of the pyodbc
driver of implicitly dropping the tzinfo from a timezone-aware date when
INSERTing into a timezone-naive DATETIME column were lost, leading to a SQL
Server error when inserting timezone-aware datetime objects into
timezone-native database columns.

Fixes: #6366
Change-Id: Id7821de13d75ede27f2165b37277a7223468dfa4
doc/build/changelog/changelog_14.rst
doc/build/changelog/unreleased_14/6366.rst [new file with mode: 0644]
lib/sqlalchemy/dialects/mssql/pyodbc.py
test/dialect/mssql/test_types.py