From e0aff0c324c698047d0d02c3796e6a94af640c8a Mon Sep 17 00:00:00 2001 From: Wolfgang Karall-Ahlborn Date: Tue, 16 Mar 2021 21:54:17 +0100 Subject: [PATCH] Fix bug when handling times that come from servers with incorrect time .seconds is always positive, .days is not. --- mha/server.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/mha/server.py b/mha/server.py index 4177e3d..10aa8a5 100644 --- a/mha/server.py +++ b/mha/server.py @@ -143,7 +143,8 @@ def index(): )""", line[0], re.DOTALL | re.X) delay = (org_time - next_time).seconds - if delay < 0: + delay_days = (org_time - next_time).days + if delay_days < 0: delay = 0 try: