[pypy-issue] [issue972] inconsistence with cpython (datetime?)

Piotr Skamruk tracker at bugs.pypy.org
Wed Dec 21 20:51:58 CET 2011


New submission from Piotr Skamruk <piotr.skamruk at gmail.com>:

pypy:
Python 2.7.1 (7773f8fc4223, Nov 18 2011, 18:47:11)
[PyPy 1.7.0 with GCC 4.4.3] on linux2
Type "help", "copyright", "credits" or "license" for more information.
And now for something completely different: ``PyPy is a tool to keep otherwise
dangerous minds safely occupied.''
>>>> t1 = 1324495440.299935
>>>> t2 = 1324495440.500568
>>>> import datetime
>>>> from datetime import datetime
>>>> datetime.utcfromtimestamp(t2) - datetime.fromtimestamp(t2)
datetime.timedelta(-1, 82799, 999999)
>>>> datetime.utcfromtimestamp(t1) - datetime.fromtimestamp(t1)
datetime.timedelta(-1, 82800)

cpython on debian:
Python 2.7.2+ (default, Dec 18 2011, 17:30:39) 
[GCC 4.6.2] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> from datetime import datetime
>>> t1 = 1324495440.299935
>>> t2 = 1324495440.500568
>>> datetime.utcfromtimestamp(t2) - datetime.fromtimestamp(t2)
datetime.timedelta(-1, 82800)
>>> datetime.utcfromtimestamp(t1) - datetime.fromtimestamp(t1)
datetime.timedelta(-1, 82800)

----------
messages: 3591
nosy: jell, pypy-issue
priority: bug
status: unread
title: inconsistence with cpython (datetime?)

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


More information about the pypy-issue mailing list