[issue1777412] datetime.strftime dislikes years before 1900

Alexander Belopolsky report at bugs.python.org
Fri Jan 7 23:59:49 CET 2011

Alexander Belopolsky <belopolsky at users.sourceforge.net> added the comment:

After r87829 (see issue10827), the insane Y2K behavior of time module functions does not extend beyond year 999.  Hopefully in Python 3.3, accept2dyear will be removed completely and datetime.strftime() will be able to support the full intersection of platform year range with that of datetime type.  Meanwhile, I propose a simple patch that lowers the 1900 limit down to 1000.  I was not able to find any evidence that there are platforms that have issues with formatting years between 1000 and 1899.

Are there any objections to committing this patch?  I will monitor the build bots if I see failures, I'll modify the test and/or add a platform-specific check to fix them.

dependencies: +Functions in time module should support year < 1900 when accept2dyear = 0
stage: patch review -> commit review
Added file: http://bugs.python.org/file20307/issue1777412.diff

Python tracker <report at bugs.python.org>

More information about the Python-bugs-list mailing list