[Zope-DB] Re: Date / Time Ranges in mxODBC DA
Dieter Maurer
dieter at handshake.de
Wed Jul 21 14:40:29 EDT 2004
Philip Kilner wrote at 2004-7-20 10:50 +0100:
>Philip Kilner wrote:
>> 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.
>>
>
>Have delved a little deeper now - dates are in range 1937 - 1987. No
>time components.
>
>Failing expression is: -
>
>Expression: <PythonExpr result.DateOfBirth.strftime('%d/%m/%Y')>
Python uses the native time handling functions (those from the standard
"C" library) and these do not like times before 1970 under Windows...
Under *nix, times between 1904 and 2036 can be handled...
--
Dieter
More information about the Zope-DB
mailing list