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 abbeyj
Recipients AmirHabibi, abbeyj, alexandre.vassalotti
Date 2009-08-02.20:04:45
SpamBayes Score 3.748083e-06
Marked as misclassified No
Message-id <1249243489.08.0.349377778748.issue6608@psf.upfronthosting.co.za>
In-reply-to
Content
Further investigation shows that MS asctime() doesn't like leap seconds
and causes an assertion when passing (2008, 12, 31, 23, 59, 60, 2, 366,
-1) -> 'Wed Dec 31 23:59:60 2008'.

Given that and since asctime() is such a simple function I think it
makes more sense to roll our own.  Attached is a rough patch which does
this.  It pulls the bounds checking used in strftime() out into its own
function so it can be used in both places.  Overriding ctime() is
necessary because Windows decided to use " %02d" instead of "%3d" to
print the day of the month.  Without overriding ctime() the output of
ctime(t) would be different from asctime(localtime(t)) and cause
test_conversion() to fail.  There is a USE_SYSTEM_ASCTIME switch to
decide whether to use the system asctime() or the internal one.
History
Date User Action Args
2009-08-02 20:04:49abbeyjsetrecipients: + abbeyj, alexandre.vassalotti, AmirHabibi
2009-08-02 20:04:49abbeyjsetmessageid: <1249243489.08.0.349377778748.issue6608@psf.upfronthosting.co.za>
2009-08-02 20:04:48abbeyjlinkissue6608 messages
2009-08-02 20:04:47abbeyjcreate