diff options
| author | Mike Bayer <mike_mp@zzzcomputing.com> | 2012-01-22 19:17:21 -0500 |
|---|---|---|
| committer | Mike Bayer <mike_mp@zzzcomputing.com> | 2012-01-22 19:17:21 -0500 |
| commit | 21870c750302704890f5fc7a4e15c7e27c3e512f (patch) | |
| tree | 2227f81e9689a022b22b29c60d6644ec9dcc9a2c /lib | |
| parent | 82e4bc2f52f2d420842819d0ffe548ca968bf54e (diff) | |
| download | sqlalchemy-21870c750302704890f5fc7a4e15c7e27c3e512f.tar.gz | |
- [bug] Adjusted the regexp used in the
mssql.TIME type to ensure only six digits
are received for the "microseconds" portion
of the value, which is expected by
Python's datetime.time(). Note that
support for sending microseconds doesn't
seem to be possible yet with pyodbc
at least. [ticket:2340]
Diffstat (limited to 'lib')
| -rw-r--r-- | lib/sqlalchemy/dialects/mssql/base.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/sqlalchemy/dialects/mssql/base.py b/lib/sqlalchemy/dialects/mssql/base.py index 7df83d057..4d7dd1c58 100644 --- a/lib/sqlalchemy/dialects/mssql/base.py +++ b/lib/sqlalchemy/dialects/mssql/base.py @@ -296,7 +296,7 @@ class TIME(sqltypes.TIME): return value return process - _reg = re.compile(r"(\d+):(\d+):(\d+)(?:\.(\d+))?") + _reg = re.compile(r"(\d+):(\d+):(\d+)(?:\.(\d{0,6}))?") def result_processor(self, dialect, coltype): def process(value): if isinstance(value, datetime.datetime): |
