fix streak check timezone conflicts

This commit is contained in:
leander committed 2025-02-06 16:51:51 +01:00
1 parent ae6d8ac64f
commit 692bf4a3c5
1 file changed
+3 -1
+3 -1
View File
@@ -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(