mikedamage/hayfever-chrome

Time rounding issue

DavidDeSloovere opened this issue · 1 comments

http://imageshack.us/photo/my-images/38/naamloos1rb.png/
I entered 1:05 in harvest (after tracking with hayfever)
Now hayfever says 1:04 in total.
(Maybe hayfever knows I fell asleep for 1 minute?)

Looks like Hayfever isn't rounding numbers correctly. I'll take a look and let you know.

Harvest stores all time as decimal numbers (base 10), but a digital clock shows numbers in sexagesimal (base 60). When Hayfever converts time from base 10 to base 60, it multiplies the numbers after the decimal point by 60 and rounds the result. So you're seeing a badly rounded number (1.08 hours == 1:04:48, which should get rounded up to 1:05 but didn't for some reason).

This is just a display bug - Harvest has the correct count and Hayfever just isn't displaying it right. So don't worry about your hours (minutes?) getting messed up. Also, concerns about Hayfever becoming self aware and watching you sleep should be reported directly to Cyberdyne Systems technical support :)