[issue13674] crash in datetime.strftime

Tim Golden report at bugs.python.org
Fri Dec 30 11:25:00 CET 2011


Tim Golden <mail at timgolden.me.uk> added the comment:

Well, the code in 2.x is quite different from that in 3.x.
Specifically, the 2.x code assumes that, for Windows, no
year before 1900 is valid for any of the formats. So a
simple check throws a ValueError for tm_year < 0. For 3.x
the assumption was that Windows can handle any year as far
back as 0; in fact that's not true for the %y format.

I'll propose a patch to timemodule.c but I'll have to take
it to python-dev as I'm not 100% sure of the best place for
it.

----------

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


More information about the Python-bugs-list mailing list