mirror of
https://github.com/home-assistant/core.git
synced 2025-07-16 01:37:08 +00:00
Fix Todoist incorrect end date when task has no time (#52258)
This commit is contained in:
parent
6afa4d6914
commit
2576dd9da9
@ -230,7 +230,7 @@ def _parse_due_date(data: dict, gmt_string) -> datetime:
|
||||
"""Parse the due date dict into a datetime object."""
|
||||
# Add time information to date only strings.
|
||||
if len(data["date"]) == 10:
|
||||
data["date"] += "T00:00:00"
|
||||
return datetime.fromisoformat(data["date"]).replace(tzinfo=dt.UTC)
|
||||
if dt.parse_datetime(data["date"]).tzinfo is None:
|
||||
data["date"] += gmt_string
|
||||
return dt.as_utc(dt.parse_datetime(data["date"]))
|
||||
|
Loading…
x
Reference in New Issue
Block a user