Huziy Oleksandr <guziy.sa...@gmail.com> added the comment:
This is a bit unfortunate for the formats without separators, that could give wrong results silently: ``` In [26]: datetime.strptime("2020010112", "%Y%m%d%H") Out[26]: datetime.datetime(2020, 1, 1, 12, 0) In [27]: datetime.strptime("2020010112", "%Y%m%d%H%M") Out[27]: datetime.datetime(2020, 1, 1, 1, 2) ``` ---------- nosy: +guziy.sasha versions: +Python 3.8 -Python 3.6 _______________________________________ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue34903> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com