[Zope] Re: TimeError in Zope 2.8.5

Dieter Maurer dieter at handshake.de
Thu Nov 23 14:16:21 EST 2006


Josef Meile wrote at 2006-11-22 22:44 +0100:
>>>>>> import time
>>>>>> time.localtime(106900545747.045975).tm_year
>>> 5357
>> 
>> Now, we understand: it's the Python "time" implementation that has
>> changed.
>> 
>> With Python 2.3.3 (under Debian Sarge), we get:
>> 
>>>>> from time import localtime
>>>>> localtime(106900545747.045975)
>> (1901, 12, 13, 21, 45, 52, 4, 347, 0)
>>>>> localtime(106900545747.045975).tm_year
>> 1901
>> 
>In my python 2.4.3 (compiled from source) and the one installed with the 
>OS, which is also 2.4.3, it doesn't work. I get:
>
>Traceback (most recent call last):
>   File "<stdin>", line 1, in ?
>ValueError: timestamp out of range for platform time_t

Another possibility is that the difference may come from the
C runtime library.


We now have several behaviours: the correct one, giving an unsane year
(probably cause by some form of truncation) and raising an exception.
It seems not to be Python nor DateTime....



-- 
Dieter


More information about the Zope mailing list