From 39d5a0e3979572e5e0beee228378450913726f81 Mon Sep 17 00:00:00 2001 From: Michael Clark Date: Tue, 17 Dec 2024 16:32:39 +0000 Subject: [PATCH] added local timezone to get_today called in create_timeline_events --- mealie/services/scheduler/tasks/create_timeline_events.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/mealie/services/scheduler/tasks/create_timeline_events.py b/mealie/services/scheduler/tasks/create_timeline_events.py index 1806e1217f2..8eb1cde5bb4 100644 --- a/mealie/services/scheduler/tasks/create_timeline_events.py +++ b/mealie/services/scheduler/tasks/create_timeline_events.py @@ -1,5 +1,6 @@ from datetime import UTC, datetime, time, timedelta +from dateutil.tz import tzlocal from pydantic import UUID4 from sqlalchemy.orm import Session @@ -29,7 +30,8 @@ def _create_mealplan_timeline_events_for_household( recipes_to_update: dict[UUID4, RecipeSummary] = {} recipe_id_to_slug_map: dict[UUID4, str] = {} - mealplans = repos.meals.get_today() + local_tz = tzlocal() + mealplans = repos.meals.get_today(tz=local_tz) for mealplan in mealplans: if not (mealplan.recipe and mealplan.user_id): continue