From 692bf4a3c5c8d48e7088fb5e83bd6711fd51d132 Mon Sep 17 00:00:00 2001 From: Leander Furumo Date: Thu, 6 Feb 2025 16:51:51 +0100 Subject: [PATCH] fix streak check timezone conflicts --- src/cogs/streak.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/cogs/streak.py b/src/cogs/streak.py index 4afe959..d16775c 100644 --- a/src/cogs/streak.py +++ b/src/cogs/streak.py @@ -143,6 +143,8 @@ class Streak(commands.Cog): Check if anyone has lost their streak """ + self.bot.logger.info("Checking streaks") + # Clear cache to make sure all streaks are up to date if self.streak_cache: await self.insert_cache() @@ -156,7 +158,7 @@ class Streak(commands.Cog): streaks = self.cursor.fetchall() for streak in streaks: - if (datetime.now(timezone.utc) - streak[1]).days >= 1: + if (datetime.now() - streak[1]).days >= 1: self.bot.logger.info(f"User {streak[0]} lost their streak") self.streak_cache.pop(streak[0]) self.cursor.execute(