Author serhiy.storchaka
Recipients Saimadhav.Heblikar, belopolsky, jamercee, lemburg, serhiy.storchaka
Date 2014-12-31.16:51:28
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <15780348.jP0JPME51R@raxxla>
In-reply-to <1420030706.75.0.708059932507.issue23136@psf.upfronthosting.co.za>
Content
Thank you Jim for your patch. That all right and the patch fixes the issue. But 
the code looks a little tricky, and it would be more robust to use other 
signal value for julian (e.g. None).

However I'm not sure that strptime should accept weekdays before the start of 
year. In C the strptime function doesn't return valid date for such input.

$ ./strptimetest "0 2015 1" "%W %Y %w"
2015-00--2 00:00:00
$ ./strptimetest "0 2015 2" "%W %Y %w"
2015-00--1 00:00:00
$ ./strptimetest "0 2015 3" "%W %Y %w"
2015-00-00 00:00:00
$ ./strptimetest "0 2015 4" "%W %Y %w"
2015-01-01 00:00:00
$ ./strptimetest "0 2015 5" "%W %Y %w"
2015-01-02 00:00:00
$ ./strptimetest "0 2015 6" "%W %Y %w"
2015-01-03 00:00:00
$ ./strptimetest "0 2015 7" "%W %Y %w"
2015-01-00 00:00:00

May be Python strptime should raise an exception for weekdays before the start 
of year as well as it raise an exception for weekdays out of range 0-6.

I'm not sure that any patch should be applied to maintained releases.
Files
File name Uploaded
strptime_julian_none.patch serhiy.storchaka, 2014-12-31.16:51:28
strptimetest.c serhiy.storchaka, 2014-12-31.16:51:28
History
Date User Action Args
2014-12-31 16:51:29serhiy.storchakasetrecipients: + serhiy.storchaka, lemburg, belopolsky, jamercee, Saimadhav.Heblikar
2014-12-31 16:51:29serhiy.storchakalinkissue23136 messages
2014-12-31 16:51:28serhiy.storchakacreate