[pypy-issue] [issue1697] utcfromtimestamp raises ValueError: time argument too large on Windows7

Kyle Lahnakoski tracker at bugs.pypy.org
Mon Mar 3 16:29:22 CET 2014


New submission from Kyle Lahnakoski <kyle at lahnakoski.com>:

utcfromtimestamp(9999999999) raises a ValueError in PyPy.  It does not happen in
cPython.


c:\Users\klahnakoski\git\Bugzilla-ETL>python
Python 2.7.4 (default, Apr  6 2013, 19:54:46) [MSC v.1500 32 bit (Intel)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> import datetime
>>> datetime.datetime.utcfromtimestamp(9999999999)
datetime.datetime(2286, 11, 20, 17, 46, 39)
>>> exit()



c:\Users\klahnakoski\git\Bugzilla-ETL>pypy
Python 2.7.3 (2cec7296d7fb, Nov 12 2013, 13:24:40)
[PyPy 2.2.0 with MSC v.1500 32 bit] on win32
Type "help", "copyright", "credits" or "license" for more information.
And now for something completely different: ``ctypes has a spin of 1/3''
>>>> import datetime
>>>> datetime.datetime.utcfromtimestamp(9999999999)
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "c:\PyPy27\lib_pypy\datetime.py", line 1530, in utcfromtimestamp
    y, m, d, hh, mm, ss, weekday, jday, dst = _time.gmtime(t)
ValueError: time argument too large
>>>> exit()

----------
messages: 6561
nosy: klahnakoski at mozilla.com, pypy-issue
priority: bug
status: unread
title: utcfromtimestamp raises ValueError: time argument too large on Windows7

________________________________________
PyPy bug tracker <tracker at bugs.pypy.org>
<https://bugs.pypy.org/issue1697>
________________________________________


More information about the pypy-issue mailing list