New submission from Yilei Yang <yileiya...@gmail.com>:

Examples:

>>> datetime.datetime(2222, 1, 1, microsecond=999999).timestamp()
7952371200.999999
>>> datetime.datetime(3333, 1, 1, microsecond=999999).timestamp()
43012195201.0
>>> datetime.datetime(2567, 1, 1, microsecond=999998).timestamp()
18839548800.999996

I believe this is an issue caused by using `double` in the C implementation.

----------
components: Library (Lib)
messages: 411676
nosy: yilei
priority: normal
severity: normal
status: open
title: datetime.timestamp() lose precision when the time is too large
type: behavior
versions: Python 3.10, Python 3.11, Python 3.7, Python 3.8, Python 3.9

_______________________________________
Python tracker <rep...@bugs.python.org>
<https://bugs.python.org/issue46525>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to