This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author mixit
Recipients mixit
Date 2010-02-26.17:41:39
SpamBayes Score 5.7606372e-05
Marked as misclassified No
Message-id <1267206102.75.0.187323607292.issue8026@psf.upfronthosting.co.za>
In-reply-to
Content
Ubuntu,8.10, python 2.5.1, intel-32
OSX, 10.6.2, python 2.5.4, intel-32
strftime() when used with timedelta(days=-ve) has problems with year rollover.
Test script demonstrates the problem, call as:
python ./test_strftime.py --startdate=01-02-2010 --count=-32

print of the datetime object gives correct years:
2009-12-31 00:00:00
2010-01-01 00:00:00
2010-01-02 00:00:00
2010-01-03 00:00:00
2010-01-04 00:00:00
2010-01-05 00:00:00

print of the strftime generated string goes wrong for first few days in Jan:
01/Feb/2010|31/Dec/2009|01/Jan/2009|02/Jan/2009|03/Jan/2009|04/Jan/2010

This happens using year 2010, 2011, 2012.

Is Ok when using 2009.

goes wrong differently when using 2008 but not 2007.
Goes wrong differently for 2006.
History
Date User Action Args
2010-02-26 17:41:42mixitsetrecipients: + mixit
2010-02-26 17:41:42mixitsetmessageid: <1267206102.75.0.187323607292.issue8026@psf.upfronthosting.co.za>
2010-02-26 17:41:40mixitlinkissue8026 messages
2010-02-26 17:41:39mixitcreate