]> git.itanic.dy.fi Git - emerge-timer/commitdiff
Fux bug in time calculations
authorEsko Kokkonen <esko.kokkonen@gmail.com>
Tue, 14 Jun 2011 13:14:33 +0000 (16:14 +0300)
committerEsko Kokkonen <esko.kokkonen@gmail.com>
Tue, 14 Jun 2011 13:14:33 +0000 (16:14 +0300)
We don't want to round up any of these days, hours or minutes because
the round has been taken into account before.

emerge-timer.py

index a79f490f901b141376fe14ef0b84af5e807a937e..b73401864256e6aea4a0c162e75f1176ac3e768a 100755 (executable)
@@ -39,9 +39,9 @@ def organize_times(time):
     minutes = (hours - int(hours))*60
     seconds = (minutes - int(minutes))*60
 
-    days = int(round(days))
-    hours = int(round(hours))
-    minutes = int(round(minutes))
+    days = int(days)
+    hours = int(hours)
+    minutes = int(minutes)
     seconds = int(round(seconds))
 
     if days > 0: