Antti Haapala added the comment:
Alexander: that is true, because they are *separate* conversion flags.
However even the POSIX standard strptime has some leniency: '%m` and `%d`
accept the numbers *without* leading zeroes. This actually also means that one
cannot use `%Y%m%d` to detect an invalid ISO timestamp:
>>> datetime.datetime.strptime('111122', '%Y%m%d')
datetime.datetime(1111, 2, 2, 0, 0)
The `arrow` library depends on the supposed "strict" behaviour of strptime that
has never been guaranteed, which often results in very buggy behaviour under
some conditions.
----
(Also, it must be noted that GNU date program doesn't use these formats to
*parse* dates, and POSIX strptime in *C* library outright ignores any timezone
information)
----------
_______________________________________
Python tracker <[email protected]>
<http://bugs.python.org/issue24954>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe:
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com