Created originally on Bitbucket by marky1991 (Mark Young)
Was already merged in Bitbucket before import, marked as merged by the import user
lib-python/test_time.py still fails test_mktime_error when run untranslated, but this test is skipped when run translated anyway. (Should it be skipped when run untranslated or is the skipping when translated the wrong behavior?) (or should the failure when untranslated be ignored?)
The main issue was that getmmarg was unconditionally subtracting 1900 from its year value. (it does this to make the result of _asctime's year field be an offset from 1900. (as if you pass no tuple at all, it uses localtime, whose year is an offset from 1900.) In cpython, this scheme works because if the year is within 1900 of the minimum negative number, the year rolls over to a huge positive number, which the asctime function then adds 1900 to the year, making it again an absolute date. In pypy, this fails because our integers do not roll over, leaving us with just a really large year.
My solution is to instead make getmmarg return an absolute year, adding 1900 to the result of localtime if no tuple is passed.