[issue1777412] Python's strftime dislikes years before 1900

David Fraser report at bugs.python.org
Sat May 10 22:41:48 CEST 2008


David Fraser <davidf at sjsoft.com> added the comment:

> Which version of Python are you using?  I could have sworn we just fixed
this problem in CVS a couple weeks ago.
This was on the latest Python 2.6 svn... but looking at the py3k branch
with viewsvn the code is definitely still there too...

The relevant commit seems to be r30224 in 2002:
> I give up:  unless I write my own strftime by hand, datetime just can't
be trusted with years before 1900, so now we raise ValueError if a date or
datetime or datetimetz .strftime() method is called with a year before
1900.

Of course I'm not dealing with any of this in the attached patch, but
then I don't have the information on which platforms have the problem...
but according to the above writing strftime by hand would be the only
solution...

_____________________________________
Tracker <report at bugs.python.org>
<http://bugs.python.org/issue1777412>
_____________________________________


More information about the Python-bugs-list mailing list