[issue23136] BUG in how _strptime() handles week 0

Saimadhav Heblikar report at bugs.python.org
Wed Dec 31 17:32:31 CET 2014


Saimadhav Heblikar added the comment:

Hi, 

Here is my understanding of it.
I have used the following C example of strptime and strftime to show that the string '0 2015 2' along with the format specifier '%W %Y %w' is invalid.

For any valid string, strptime followed by strftime should return the same string. This is easily verified. However, when you try the same thing(as in the attached example) with '0 2015 2', we get a different string after strptime followed by strftime, indicating the string is invalid.

Do let me know if I have made any mistake in understanding this.

----------
Added file: http://bugs.python.org/file37572/example.c

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


More information about the Python-bugs-list mailing list