Skip to content

Commit

Permalink
Add in controversial timezone workaround
Browse files Browse the repository at this point in the history
  • Loading branch information
snan committed Sep 23, 2023
1 parent c821ab9 commit 6a22e23
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion toot/entities.py
Original file line number Diff line number Diff line change
Expand Up @@ -394,7 +394,7 @@ def _convert(field_type, value):
return datetime.strptime(value, "%Y-%m-%dT%H:%M:%S.%f%z")

if field_type == date:
return datetime.fromisoformat(value).date()
return datetime.fromisoformat(value.replace('Z', '+00:00')).date()

if get_origin(field_type) == list:
(inner_type,) = get_args(field_type)
Expand Down

0 comments on commit 6a22e23

Please sign in to comment.