From 8ca86f2234b8e054a054eff57384f4de9c6b618e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nikola=20Forr=C3=B3?= Date: Tue, 8 Sep 2020 22:44:39 +0200 Subject: [PATCH] Fix timezone-naive datetime --- bot.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bot.py b/bot.py index 7cdb680..9229074 100644 --- a/bot.py +++ b/bot.py @@ -146,7 +146,7 @@ class Bot(discord.Client): if video.get('live_broadcast') == 'upcoming': scheduled_start = video.get('scheduled_start') if scheduled_start: - remaining = (scheduled_start - datetime.datetime.utcnow()).total_seconds() + remaining = (scheduled_start - datetime.datetime.now(datetime.timezone.utc)).total_seconds() for minutes in COUNTDOWN: if remaining > minutes * 60: Timer.schedule(scheduled_start - datetime.timedelta(minutes=minutes), data)