2
0
mirror of https://opendev.org/x/pyghmi synced 2025-01-15 12:17:44 +00:00

Add month/day/year to parse

Some fields come with this format timestamp rather than ISO format.

Change-Id: I9e361a97f4ba42da6b0aab0ac4d9ae126a58c255
This commit is contained in:
Jarrod Johnson 2019-05-28 09:47:18 -04:00
parent 710b12658c
commit 7d3eb11407

View File

@ -56,4 +56,8 @@ def parse_time(timeval):
return datetime.strptime(timeval, '%Y-%m-%d')
except ValueError:
pass
try:
return datetime.strptime(timeval, '%m/%d/%Y')
except ValueError:
pass
return None