[issue44831] Inconsistency between datetime.now() and datetime.fromtimestamp(time.time(), None)
Miksus
report at bugs.python.org
Wed Aug 4 13:55:51 EDT 2021
Miksus <koli.mikael at gmail.com> added the comment:
I accidentially posted Python 3.6 link to the declaration of datetime.datetime.now() but this has been unchanged: https://github.com/python/cpython/blob/3d2b4c6f18d7e644e5850d2af74ac5dc530eb24c/Lib/datetime.py#L1696
The actual piece of code as of now:
...
import time as _time
...
@classmethod
def now(cls, tz=None):
"Construct a datetime from time.time() and optional time zone info."
t = _time.time()
return cls.fromtimestamp(t, tz)
----------
_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue44831>
_______________________________________
More information about the Python-bugs-list
mailing list