fix: Make Mealie Timezone-Aware (#3847)

Co-authored-by: boc-the-git <3479092+boc-the-git@users.noreply.github.com>
This commit is contained in:
Michael Genson
2024-07-08 16:12:20 -05:00
committed by GitHub
parent 17f9eef551
commit d5f7a883df
69 changed files with 250 additions and 176 deletions

View File

@@ -1,4 +1,4 @@
from datetime import datetime
from datetime import datetime, timezone
from functools import cached_property
from fastapi import APIRouter, BackgroundTasks, Depends
@@ -45,7 +45,7 @@ class ReadWebhookController(BaseUserController):
"""Manually re-fires all previously scheduled webhooks for today"""
start_time = datetime.min.time()
start_dt = datetime.combine(datetime.utcnow().date(), start_time)
start_dt = datetime.combine(datetime.now(timezone.utc).date(), start_time)
post_group_webhooks(start_dt=start_dt, group_id=self.group.id)
@router.get("/{item_id}", response_model=ReadWebhook)