mikedamage / hayfever-chrome

An extension for Google Chrome that lets you manage your Harvest timers
http://mikedamage.github.com/hayfever-chrome
GNU General Public License v2.0
22 stars 10 forks source link

Time rounding issue #21

Closed DavidDeSloovere closed 3 years ago

DavidDeSloovere commented 13 years ago

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?)

mikedamage commented 13 years ago

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 :)