time.mktime memory access violation bug
Irmen de Jong
irmen at -NOSPAM-REMOVETHIS-xs4all.nl
Tue Nov 18 20:10:36 EST 2003
Bengt Richter wrote:
> Python 2.3.2 (#49, Oct 2 2003, 20:02:00) [MSC v.1200 32 bit (Intel)] on win32
> Type "help", "copyright", "credits" or "license" for more information.
> >>> import time
> >>> time.mktime((1969, 12, 31, 17, 0, 0, 0, 0, 0))
> 3600.0
> >>> time.mktime((1969, 12, 31, 17, 0, 0, 0, 0, 1))
> 0.0
> >>> time.mktime((1969, 12, 31, 16, 0, 0, 0, 0, 1))
> [crash with popup]
Curious. I get (windows XP):
Python 2.3.2 (#49, Oct 2 2003, 20:02:00) [MSC v.1200 32 bit (Intel)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> import time
>>> time.mktime((1969, 12, 31, 17, 0, 0, 0, 0, 0))
Traceback (most recent call last):
File "<stdin>", line 1, in ?
OverflowError: mktime argument out of range
>>> time.mktime((1969, 12, 31, 17, 0, 0, 0, 0, 1))
Traceback (most recent call last):
File "<stdin>", line 1, in ?
OverflowError: mktime argument out of range
>>> time.mktime((1969, 12, 31, 16, 0, 0, 0, 0, 1))
Traceback (most recent call last):
File "<stdin>", line 1, in ?
OverflowError: mktime argument out of range
>>>
On Linux I get the same results. Something fishy is going
on with your Python...
--Irmen de Jong
More information about the Python-list
mailing list