[issue41321] Calculate timestamp is wrong in datetime.datetime

Karthikeyan Singaravelan report at bugs.python.org
Fri Jul 17 05:52:26 EDT 2020


Karthikeyan Singaravelan <tir.karthi at gmail.com> added the comment:

I cannot reproduce the report on 3.8 and master. Both of the instances return 26002 which is 7 hours, 13 minutes and 22 seconds. Can you please attach a script that I can run to reproduce the difference?

python3
Python 3.8.0 (v3.8.0:fa919fdf25, Oct 14 2019, 10:23:27)
[Clang 6.0 (clang-600.0.57)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import datetime
>>> datetime.datetime(1986, 5, 4, 7, 13, 22).timestamp() - datetime.datetime(1986, 5, 4, 0, 0, 0).timestamp()
26002.0
>>> datetime.datetime(1986, 5, 2, 7, 13, 22).timestamp() - datetime.datetime(1986, 5, 2, 0, 0, 0).timestamp()
26002.0

----------
nosy: +xtreak

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


More information about the Python-bugs-list mailing list