Mercurial > getan > getan
diff getan/template.py @ 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 | 59d9c5840273 |
children | a59622c06936 |
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: