mirror of
https://github.com/Kunsi/scheduled-plugin-pretalx-broadcast-tools.git
synced 2024-12-22 08:12:44 +00:00
fix bug with day zero having weird timezone offset
This commit is contained in:
parent
0e909333d6
commit
429377564b
1 changed files with 2 additions and 4 deletions
6
service
6
service
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue