From 4bdc9a3dea4411ac8512df66667c42707d0fbd4a Mon Sep 17 00:00:00 2001 From: Papoteur Date: Thu, 28 May 2020 23:05:29 +0200 Subject: Fix displaying Connection time (hours and minutes were always zero) --- src/monitor.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/monitor.py b/src/monitor.py index ac625e6..7923103 100644 --- a/src/monitor.py +++ b/src/monitor.py @@ -434,7 +434,7 @@ class Monitor: else: curtime = int(time.time()) uptime = curtime - uptime - hours = uptime / 3600 - mins = (uptime - (hours * 3600)) / 60 + hours = uptime // 3600 + mins = (uptime - (hours * 3600)) // 60 secs = uptime % 60 return _("%(hours)d hours, %(mins)d minutes, %(secs)d seconds") % {"hours" : hours, "mins" : mins, "secs" : secs} -- cgit v1.2.1