[issue39484] time_ns() and time() cannot be compared on windows

Mark Dickinson report at bugs.python.org
Sun Feb 9 09:42:49 EST 2020


Mark Dickinson <dickinsm at gmail.com> added the comment:

[Larry]

> It takes *30* bits to store the non-fractional seconds part of the current time in a double

I make it 31. :-)

>>> from datetime import datetime
>>> time_since_epoch = datetime.now() - datetime(1970, 1, 1)
>>> int(time_since_epoch.total_seconds()).bit_length()
31

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue39484>
_______________________________________


More information about the Python-bugs-list mailing list