zillow / ctds

Python DB-API 2.0 library for MS SQL Server
MIT License
83 stars 12 forks source link

datetimeoffset support #14

Open chad-ongstad opened 6 years ago

chad-ongstad commented 6 years ago

I was attempting to use this library and am having issues with a table containing a datetimeoffset column. Is this not supported in ctds?

NotSupportedError: unsupported type 43 for column

Thanks,

Chad

joshuahlang commented 6 years ago

Looks like support for this type was added to FreeTDS after I had started working on ctds. I can look into adding support when I get some free time in the next few days.

joshuahlang commented 6 years ago

Support for timezone creation in the C API is coming in Python 3.7 it appears: https://github.com/python/cpython/pull/5032. I suppose translating the DATETIMEOFFSET to an ISO 8601-encoded string is reasonable for versions prior to 3.7