[issue23134] datetime.strptime at the turn of the year

2014-12-31 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: Closing as a duplicate of #23136. -- resolution: -> duplicate stage: -> resolved status: open -> closed superseder: -> BUG in how _strptime() handles week 0 versions: +Python 2.7, Python 3.2, Python 3.3, Python 3.4 _

[issue23134] datetime.strptime at the turn of the year

2014-12-31 Thread Martin Panter
Martin Panter added the comment: Issue 23136 looks like a duplicate, but has a potential patch -- nosy: +vadmium ___ Python tracker ___ __

[issue23134] datetime.strptime at the turn of the year

2014-12-30 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: In C the strptime function doesn't return valid data if an input is invalid. $ ./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 $ ./st

[issue23134] datetime.strptime at the turn of the year

2014-12-30 Thread Tomasz Ryczkowski
New submission from Tomasz Ryczkowski: I've found wrong behaviour datetime.strptim function at the turn of the year. I've created datetime object base on the week number (%W), year (%Y) and day of week (%w). The date for Tuesday in the first week in 2015 is wrong: >>> from datetime import date