[Zope-DB] Date / Time Ranges in mxODBC DA

M.-A. Lemburg mal at egenix.com
Wed Jul 21 17:26:00 EDT 2004


Philip Kilner wrote:
> Hi List,
> 
>> Am using Zope 2.7/Plone 2.03, mxODBC DA against MS SQL Server.
>>
>> I'm seeing the error "The time -609897600.000000 is beyond the range 
>> of this Python implementation." against a recordset which should have 
>> dates within a "sane range". Earliest dates would be Dates of Birth, 
>> latest would be within the next decade.
>>
> 
> ...the problem goes away if I set the option "Fetch date/time columns as 
> mxDateTime values ?"
 >
> I'm back in business now, but I'd still be interested to know where the 
> duff time comes from!

Just like most DAs and to be more compatible to Zope in general,
mxODBC Zope DA converts date/time values to Zope's own DateTime
implementation which relies on the time module.

Dates outside the range 1970-2038 usually cause problems with
the time module (depending on the platform).

mxODBC Zope DA can optionally use the mxDateTime package which
is included in the DA which lifts most of these limitations.

-- 
Marc-Andre Lemburg
eGenix.com

Professional Python Services directly from the Source  (#1, Jul 21 2004)
 >>> Python/Zope Consulting and Support ...        http://www.egenix.com/
 >>> mxODBC.Zope.Database.Adapter ...             http://zope.egenix.com/
 >>> mxODBC, mxDateTime, mxTextTools ...        http://python.egenix.com/
________________________________________________________________________

::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! ::::


More information about the Zope-DB mailing list