[System] Fixed typo in utils
This commit is contained in:
parent
22499b7ece
commit
79c05fa2f4
|
@ -7,5 +7,5 @@ def from_iso_format(date_str):
|
||||||
"""Z-suffix aware version of `datetime.datetime.fromisoformat`"""
|
"""Z-suffix aware version of `datetime.datetime.fromisoformat`"""
|
||||||
time = datetime.datetime.fromisoformat(date_str.replace('Z', '+00:00'))
|
time = datetime.datetime.fromisoformat(date_str.replace('Z', '+00:00'))
|
||||||
if time.tzinfo:
|
if time.tzinfo:
|
||||||
return time.astimezone(tzinfo=datetime.timezone.utc)
|
return time.astimezone(datetime.timezone.utc)
|
||||||
return time.replace(tzinfo=datetime.timezone.utc)
|
return time.replace(tzinfo=datetime.timezone.utc)
|
||||||
|
|
Loading…
Reference in New Issue