Alexander Belopolsky added the comment: The question is whether -62135658000.0 is the "correct" or even meaningful value:
>>> datetime.utcfromtimestamp(-62135658000.0) Traceback (most recent call last): File "<stdin>", line 1, in <module> ValueError: year is out of range (I ran the above in Python 2.7 to avoid any 3.x datetime innovations.) I don't see much of a value in allowing datetime.timestamp() to produce values that correspond to out of bounds datetimes in UTC. In most cases this will only result in error later on in the program, or worse an error passing undetected. What is the use case for datetime.min.timestamp()? I suspect OP encountered this issue in an overly aggressive edge case testing and not in a real user scenario. ---------- _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue31212> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com