changeset 511:31ea48bf8a7c

human_time calculates up to 59 minutes, not 60. * Porting the human_time function from Python2 to Python3. Minutes and hours must be integer.
author Magnus Schieder <mschieder@intevation.de>
date Tue, 06 Nov 2018 13:01:08 +0100
parents 8c7a00a984da
children 9d8b31712380
files getan/template.py
diffstat 1 files changed, 2 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/getan/template.py	Fri Nov 02 15:51:16 2018 +0100
+++ b/getan/template.py	Tue Nov 06 13:01:08 2018 +0100
@@ -23,8 +23,8 @@
     days = delta.days
     seconds = days * 3600 * 24
     s = seconds + delta.seconds
-    h = s / 3600
-    m = (s % 3600) / 60
+    h = s // 3600
+    m = (s % 3600) // 60
     if (s % 60) >= 30:
         m += 1
         if m == 60:
This site is hosted by Intevation GmbH (Datenschutzerklärung und Impressum | Privacy Policy and Imprint)