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:
parent
710b12658c
commit
7d3eb11407
@ -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
|
Loading…
x
Reference in New Issue
Block a user