[Zope-dev] DateTime, strftime and TimeError
Santi Camps
scamps at earcon.com
Wed May 11 10:08:38 EDT 2005
Hi all,
I think its known that using strftime method of DateTime module with
dates <= 1900 or >= 2038, a TimeError is raised. 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
I've read that the reason was a validation to avoid int overflows. I
think this could be fixed using datetime module (new in python 2.3)
instead of old time.localtime
Do you think its a good idea ? Can I provide a patch that way ?
Thanks
Santi Camps
More information about the Zope-Dev
mailing list