[issue1777412] Python's strftime dislikes years before 1900

Alexander Belopolsky report at bugs.python.org
Sun Jun 6 02:22:51 CEST 2010


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

I see this in py3k branch on MacOS X:

[GCC 4.2.1 (Apple Inc. build 5646) (dot 1)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import datetime
>>> datetime.date(1876, 2, 3).strftime('%Y-%m-%d')
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
ValueError: year=1876 is before 1900; the datetime strftime() methods require year >= 1900


I like the approach taken in the David's patch.  The datetime module should stop piggybacking on the time module.

----------
assignee:  -> belopolsky
nosy: +belopolsky
versions: +Python 3.2

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


More information about the Python-bugs-list mailing list