From 0cb220acff9444a888f9c9f26f4b36fb9974b033 Mon Sep 17 00:00:00 2001 From: rubenwardy Date: Sun, 6 Nov 2022 19:12:43 +0000 Subject: [PATCH] Use UTC dates for stats --- app/models/packages.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/models/packages.py b/app/models/packages.py index f7614a43..bab340d9 100644 --- a/app/models/packages.py +++ b/app/models/packages.py @@ -1220,7 +1220,8 @@ class PackageDailyStats(db.Model): @staticmethod def update(package: Package, is_minetest: bool, reason: str): - date = datetime.date.today() + date = datetime.datetime.utcnow().date() + to_update = dict() kwargs = { "package_id": package.id, "date": date