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,6 +1,6 @@
import json
import shutil
from datetime import datetime
from datetime import datetime, timezone
from pathlib import Path
from shutil import copytree, rmtree
from typing import Any
@@ -157,7 +157,7 @@ class RecipeService(BaseService):
recipe_id=new_recipe.id,
subject="Recipe Created",
event_type=TimelineEventType.system,
timestamp=new_recipe.created_at or datetime.now(),
timestamp=new_recipe.created_at or datetime.now(timezone.utc),
)
self.repos.recipe_timeline_events.create(timeline_event_data)