Skip to content

Commit

Permalink
utils.py: Fix for Z timezone suffix in all python versions
Browse files Browse the repository at this point in the history
  • Loading branch information
Ed (ODSC) committed Sep 23, 2024
1 parent 475d625 commit 35d3d63
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion libcovebods/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ def parse_date_field(date_str):
elif re.match(r"^[0-9]{4}-[0-9]{1,2}$", date_str):
return datetime.datetime.strptime(date_str, "%Y-%m").date()
else:
return datetime.datetime.fromisoformat(date_str).date()
return datetime.datetime.fromisoformat(date_str.replace('Z', '+00:00')).date()
else:
return None

Expand Down

0 comments on commit 35d3d63

Please sign in to comment.