GNOME Bugzilla – Bug 675833
Overview - Activities calculates durations incorrectly
Last modified: 2012-09-24 19:34:18 UTC
Created attachment 213827 [details] screenshot with and without the attached fix Occurs in 2.30.2 (the version of Hamster in Debian Squeeze). The Activities tab in the Overview shows the wrong time values. For example, a task from 14:52 - 15:03 is shown as being 10 minutes, instead of 11. It happens to roughly half the tasks, so I suspected a rounding bug, and found that this patch fixes the issue: --- stuff.py.orig 2012-05-10 10:48:10.761716704 -0700 +++ stuff.py 2012-05-10 10:56:49.493696613 -0700 @@ -68,7 +68,7 @@ def duration_minutes(duration): """returns minutes from duration, otherwise we keep bashing in same math""" - return duration.seconds / 60 + duration.days * 24 * 60 + return (duration.seconds + 30) / 60 + duration.days * 24 * 60 def load_ui_file(name): That file on github (what I believe is the current trunk) is very different, so I can't tell if the bug still exists in newer versions, but there are a couple instances of "seconds/60" in there; if seconds are stored as integers there may still be some related issues.
moved: https://github.com/projecthamster/hamster/issues/26