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 akira, belopolsky, koobs, martin.panter, python-dev, stub, tim.peters, vstinner
Date 2016-07-24.16:07:00
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
> the time_t OverflowError

The issue here is that for a large date, dt.timestamp() returns a float large enough to cause overflow in fromtimestamp.

> Let me know if you want any more info.

Can you figure out what date causes this (0002-01-01 or 9998-12-12 or both)?  What value is returned by dt.timestamp()?  Does pure python implementation behave the same as C? (SEt sys.modules['_datetime'] to None before importing datetime to get a pure python implementation.)

> In my case the message for the test_all() failure is “posix/Africa/Casablanca system_transitions”.

Do you get this failure only on a 32-bit interpreter?  Please add

class CasablancaTest(ZoneInfoTest):
    zonename = 'Africa/Casablanca'

to and run python -mtest -v test_datetime.
Date User Action Args
2016-07-24 16:07:00belopolskysetrecipients: + belopolsky, tim.peters, vstinner, stub, akira, python-dev, martin.panter, koobs
2016-07-24 16:07:00belopolskysetmessageid: <>
2016-07-24 16:07:00belopolskylinkissue24773 messages
2016-07-24 16:07:00belopolskycreate