This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: Timestamps are rounded differently in py3k and trunk
Type: behavior Stage: test needed
Components: Extension Modules Versions: Python 3.2, Python 2.7
process
Status: closed Resolution: not a bug
Dependencies: Superseder:
Assigned To: belopolsky Nosy List: belopolsky, georg.brandl, mark.dickinson, tim.peters
Priority: normal Keywords:

Created on 2010-06-24 18:02 by belopolsky, last changed 2022-04-11 14:57 by admin. This issue is now closed.

Messages (2)
msg108536 - (view) Author: Alexander Belopolsky (belopolsky) * (Python committer) Date: 2010-06-24 18:02
In the trunk:

>>> datetime.utcfromtimestamp(0.9999994)
datetime.datetime(1970, 1, 1, 0, 0, 1)

In py3k:

>>> datetime.utcfromtimestamp(0.9999994)
datetime.datetime(1970, 1, 1, 0, 0, 0, 999999)


See issue1478429 - it appears that rounding up was intentional, but I am adding 2.7 because py3k behavior seems to be more natural.
msg108541 - (view) Author: Alexander Belopolsky (belopolsky) * (Python committer) Date: 2010-06-24 18:27
My mistake.  I had datetime.py from pypy in the directory from which I ran the trunk python.  The problem is also in the latest sandbox version of datetime.py, but this is not yet part of cpython proper.

Refiled as pypy bug at http://codespeak.net/issue/pypy-dev/issue548
History
Date User Action Args
2022-04-11 14:57:02adminsetgithub: 53316
2010-06-24 18:27:32belopolskysetstatus: open -> closed
resolution: not a bug
messages: + msg108541
2010-06-24 18:02:05belopolskycreate