Skip to content
This repository has been archived by the owner on Aug 16, 2024. It is now read-only.

Commit

Permalink
TImezones
Browse files Browse the repository at this point in the history
  • Loading branch information
andrew-codechimp committed Jun 1, 2024
1 parent fcb2ba2 commit 27ce12b
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion custom_components/mealie/calendar.py
Original file line number Diff line number Diff line change
Expand Up @@ -126,10 +126,21 @@ async def async_get_events(
start = datetime.strptime(mealie_start_dt, "%Y-%m-%d %H:%M:%S")
end = datetime.strptime(mealie_end_dt, "%Y-%m-%d %H:%M:%S")


start = start.replace(tzinfo=dt_util.DEFAULT_TIME_ZONE)
end = end.replace(tzinfo=dt_util.DEFAULT_TIME_ZONE)

# start = start.replace(tzinfo=dt_util.get_time_zone(self.hass.config.time_zone))
# end = end.replace(tzinfo=dt_util.get_time_zone(self.hass.config.time_zone))

# start_utc = dt_util.as_utc(start)
# end_utc = dt_util.as_utc(end)

# start_utc = start_utc.replace(tzinfo=dt_util.DEFAULT_TIME_ZONE)
# end_utc = end_utc.replace(tzinfo=dt_util.DEFAULT_TIME_ZONE)

# start = start.replace(tzinfo=dt_util.get_time_zone(self.hass.config.time_zone))
# end = end.replace(tzinfo=dt_util.get_time_zone(self.hass.config.time_zone))

if plan["recipeId"]:
summary = plan["recipe"]["name"]
else:
Expand Down

0 comments on commit 27ce12b

Please sign in to comment.