helpers: do not include microseconds in parsing

This commit is contained in:
Marcin Kuzminski 2019-05-21 13:29:00 +02:00
parent 5549543ed3
commit 434efcd94f

View file

@ -107,7 +107,8 @@ def parse_datetime(text):
if isinstance(text, datetime.datetime):
return text
text = text.strip().lower()
# we limit a format to no include microseconds e.g 2017-10-17t17:48:23.XXXX
text = text.strip().lower()[:19]
input_formats = (
'%Y-%m-%d %H:%M:%S',