summaryrefslogtreecommitdiff
path: root/lib/sqlalchemy/dialects
diff options
context:
space:
mode:
authorMike Bayer <mike_mp@zzzcomputing.com>2019-11-13 10:09:54 -0500
committerMike Bayer <mike_mp@zzzcomputing.com>2019-11-13 10:09:54 -0500
commit2644d4cb51ed580cb9c4eb3cb600a056a2c893a3 (patch)
tree6f1bcd6779ac9c8637ed2bd5c2cbd820ad4d2cb6 /lib/sqlalchemy/dialects
parentbe2cd2791ea65fb76b193a34752361f1e76d68b2 (diff)
downloadsqlalchemy-2644d4cb51ed580cb9c4eb3cb600a056a2c893a3.tar.gz
Base mssql.DATETIMEOFFSET on DateTime
Fixed the base class of the :class:`.mssql.DATETIMEOFFSET` datatype to be based on the :class:`.DateTime` class hierarchy, as this is a datetime-holding datatype. Note however that at the moment the pyodbc driver has only limited support for this datatype and will not work with all ODBC drivers. References: https://github.com/mkleehammer/pyodbc/issues/134 Fixes: #4980 Change-Id: I946cf22642eea4beee2a605d91218c6fd817740c
Diffstat (limited to 'lib/sqlalchemy/dialects')
-rw-r--r--lib/sqlalchemy/dialects/mssql/base.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/sqlalchemy/dialects/mssql/base.py b/lib/sqlalchemy/dialects/mssql/base.py
index 261ebe5c2..ded90c348 100644
--- a/lib/sqlalchemy/dialects/mssql/base.py
+++ b/lib/sqlalchemy/dialects/mssql/base.py
@@ -1019,11 +1019,11 @@ class DATETIME2(_DateTimeBase, sqltypes.DateTime):
self.precision = precision
-# TODO: is this not an Interval ?
-class DATETIMEOFFSET(sqltypes.TypeEngine):
+class DATETIMEOFFSET(_DateTimeBase, sqltypes.DateTime):
__visit_name__ = "DATETIMEOFFSET"
- def __init__(self, precision=None, **kwargs):
+ def __init__(self, precision=None, **kw):
+ super(DATETIMEOFFSET, self).__init__(**kw)
self.precision = precision