Re: [Zope] Re: TimeError in Zope 2.8.5

2006-11-23 Thread Dieter Maurer
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
___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope-dev )


[Zope] Re: TimeError in Zope 2.8.5

2006-11-22 Thread Josef Meile

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

So, I guess there should be something that you can configurate when 
building python, or it is perhaps a linux kernel paramater. With python 
2.3.5 it works however, so, it is a change in python as Dieter mentioned.


By running the zopectl in debug mode for zope 2.9.4, the resulting 
traceback is the same as the one posted by the OP. With zope 2.8.8 it 
runs without any problem. So, it could be that the provider is running 
zope 2.8.5 with python 2.4.


Regards
Josef
___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
http://mail.zope.org/mailman/listinfo/zope-announce

http://mail.zope.org/mailman/listinfo/zope-dev )