Skip to content

Commit

Permalink
added local timezone to get_today called in create_timeline_events
Browse files Browse the repository at this point in the history
  • Loading branch information
michaelclark2 committed Dec 17, 2024
1 parent 6980b0a commit 39d5a0e
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion mealie/services/scheduler/tasks/create_timeline_events.py
Original file line number Diff line number Diff line change
@@ -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

Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 39d5a0e

Please sign in to comment.