[issue19738] pytime.c loses precision under Windows

Tim Peters report at bugs.python.org
Sat Nov 23 23:02:43 CET 2013


Tim Peters added the comment:

Just noting for the record that a C double (time.time() result) isn't quite enough to hold a full-precision Windows time regardless:

>>> from datetime import date
>>> d = date.today() - date(1970, 1, 1)
>>> s = int(d.total_seconds())  # seconds into "the epoch"
>>> s *= 10**7  # number of 100ns into the epoch
>>> s.bit_length()
54
>>> 54 > 53  # QED ;-)
True

----------

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue19738>
_______________________________________


More information about the Python-bugs-list mailing list