[issue44610] Format issue with strftime and %Y

2021-07-12 Thread Bartosz Kaznowski
New submission from Bartosz Kaznowski : When you convert a date pre the year 1000 to a string with `%Y` as the formatter and then back to a date again then it fails. This is because `%Y` expects it to be formatted with leading zeroes. For example, the year 1/01/01 (/mm/dd) should be 0001

[issue44610] Format issue with strftime and %Y

2021-07-12 Thread Bartosz Kaznowski
Change by Bartosz Kaznowski : -- versions: +Python 3.9 -Python 3.7 ___ Python tracker <https://bugs.python.org/issue44610> ___ ___ Python-bugs-list mailin

[issue44610] Format issue with strftime and %Y

2021-07-12 Thread Bartosz Kaznowski
Change by Bartosz Kaznowski : -- versions: +Python 3.10, Python 3.6, Python 3.7, Python 3.8 ___ Python tracker <https://bugs.python.org/issue44610> ___ ___ Pytho

[issue44610] Format issue with strftime and %Y

2021-07-19 Thread Bartosz Kaznowski
Bartosz Kaznowski added the comment: Ok, thanks @iritkatriel. I have closed it as a duplicate. I did notice after posting this that in the cpython source code people work around this issue. Now I can see why. I guess I will just have to work around this issue too. Luckily it doesn't