This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author belopolsky
Recipients Dave Johansen, belopolsky, vstinner
Date 2017-08-16.21:44:01
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1502919841.99.0.886807096904.issue31212@psf.upfronthosting.co.za>
In-reply-to
Content
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.
History
Date User Action Args
2017-08-16 21:44:02belopolskysetrecipients: + belopolsky, vstinner, Dave Johansen
2017-08-16 21:44:01belopolskysetmessageid: <1502919841.99.0.886807096904.issue31212@psf.upfronthosting.co.za>
2017-08-16 21:44:01belopolskylinkissue31212 messages
2017-08-16 21:44:01belopolskycreate