[ZCM] [ZC] 1780/ 1 Request "DateTime.strftime raises TimeError for
dates <= 1900 or >= 2038"
Collector: Zope Bugs, Features,
and Patches ...
zope-coders-admin at zope.org
Fri May 13 04:33:57 EDT 2005
Issue #1780 Update (Request) "DateTime.strftime raises TimeError for dates <= 1900 or >= 2038"
Status Pending, Zope/bug+solution medium
To followup, visit:
http://www.zope.org/Collectors/Zope/1780
==============================================================
= Request - Entry #1 by scamps on May 13, 2005 4:33 am
Uploaded: "DateTime.bin"
- http://www.zope.org/Collectors/Zope/1780/DateTime.bin/view
Its known that using strftime method of DateTime module with dates <= 1900 or >= 2038, a TimeError is raised (in 32 bits architectures). For instance:
>> d = DateTime('2045/30/01')
>> d.strftime('%d/%m/%Y')
DateTime.DateTime.TimeError: The time 2369343600.000000 is beyond the range of this Python implementation
At least is possible to fix the problem in strftime method using datetime module, new in python 2.3. I attach a patch that works for me, with two additional unittests, and passing all previous unittests defined for the module. Hope this can be commited.
==============================================================
More information about the Zope-Collector-Monitor
mailing list