Alex Quinn added the comment:

This bug still exists in Python 2.7.3 32-bit on Linux.

I wonder if this might be because the patch (posted 2011-02-18) used 
utcfromtimestamp().  datetime.datetime.utcfromtimestamp(2**32) will fail on 
32-bit systems.

The bug does NOT exist in Python 2.7.3 32-bit on Windows (64-bit OS).

==========================================
32-BIT PYTHON ON 32-BIT LINUX
------------------------------------------
$ python -c "import sys, cookielib; print sys.version; print 
cookielib.time2isoz(2322923767)"
2.7.3 (default, Apr 10 2013, 05:46:21) 
[GCC 4.6.3]
Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "/usr/lib/python2.7/cookielib.py", line 99, in time2isoz
    year, mon, mday, hour, min, sec = time.gmtime(t)[:6]
ValueError: timestamp out of range for platform time_t
==========================================


==========================================
64-BIT PYTHON ON 64-BIT LINUX
------------------------------------------
$ python -c "import sys, cookielib; print sys.version; print 
cookielib.time2isoz(2322923767)"
2.7.3 (default, Aug  3 2012, 17:21:07)
[GCC 4.1.2 20080704 (Red Hat 4.1.2-52)]
2043-08-11 16:36:07Z
==========================================


==========================================
32-BIT PYTHON ON 64-BIT WINDOWS
------------------------------------------
C:\>python -c "import sys, cookielib; print sys.version; print 
cookielib.time2isoz(2322923767)"
2.7.3 (default, Apr 10 2012, 23:31:26) [MSC v.1500 32 bit (Intel)]
2043-08-11 16:36:07Z
==========================================

----------
nosy: +Alex Quinn
Added file: http://bugs.python.org/file31370/monkey_patch_cookielib_time2isoz.py

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue5537>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to