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

Commit

Permalink
TZ
Browse files Browse the repository at this point in the history
  • Loading branch information
andrew-codechimp committed Jun 2, 2024
1 parent 79191ef commit 54df2cc
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions custom_components/mealie/calendar.py
Original file line number Diff line number Diff line change
Expand Up @@ -108,15 +108,15 @@ def dinner_end(self) -> datetime:
def event(self) -> CalendarEvent | None:
"""Return the next upcoming event."""

if self.breakfast_start <= dt_util.utcnow() <= self.breakfast_end:
if self.breakfast_start <= dt_util.now() <= self.breakfast_end:
if self.coordinator.todays_breakfast():
return CalendarEvent(start=self.breakfast_start, end=self.breakfast_end, summary=self.coordinator.todays_breakfast())

if self.lunch_start <= dt_util.utcnow() <= self.lunch_end:
if self.lunch_start <= dt_util.now() <= self.lunch_end:
if self.coordinator.todays_lunch():
return CalendarEvent(start=self.lunch_start, end=self.lunch_end, summary=self.coordinator.todays_lunch())

if self.dinner_start <= dt_util.utcnow() <= self.dinner_end:
if self.dinner_start <= dt_util.now() <= self.dinner_end:
if self.coordinator.todays_dinner():
return CalendarEvent(start=self.dinner_start, end=self.dinner_end, summary=self.coordinator.todays_dinner())

Expand Down

0 comments on commit 54df2cc

Please sign in to comment.