[issue1777412] datetime.strftime dislikes years before 1900

STINNER Victor report at bugs.python.org
Sat Jan 8 17:40:35 CET 2011


STINNER Victor <victor.stinner at haypocalc.com> added the comment:

time.asctime(), time.ctime() and time.strftime() are no more not limited for the year field if accept2dyear=0. Except with Visual Studio or on Solaris: the year is limited to the range [1; 9999].

datetime.strftime() is limited to year >= 1000 (instead of year >= 1900) because it cannot set accept2dyear=0 temporary (it is no thread safe). We might fix it, but it is complex and not really needed. The correct fix is just to remove accept2dyear (and consider that accept2dyear=0), which cannot be done before Python 3.3.

Anyway, the situation is much better in Python 3.2 than Python 3.1, and I consider that it's enough. Let's close the issue.

----------
resolution:  -> fixed
status: open -> closed

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue1777412>
_______________________________________


More information about the Python-bugs-list mailing list