fix bug with day zero having weird timezone offset

This commit is contained in:
Franzi 2023-09-30 15:06:39 +02:00
parent 0e909333d6
commit 429377564b

View file

@ -28,10 +28,8 @@ def idle(seconds, event_start, event_tz):
event_now = datetime.now(event_tz)
utc_now = datetime.now(pytz.utc)
utc_offset = (event_now - utc_now).total_seconds()
day_zero = event_start.replace(
hour=0, minute=0, second=0, tzinfo=event_tz
day_zero = event_tz.localize(
event_start.replace(hour=0, minute=0, second=0)
) - timedelta(days=1)
day_info = event_now - day_zero