From: James Bunton Date: Sat, 16 Feb 2013 23:46:08 +0000 (+1100) Subject: Fixed calculation of hours/minutes display X-Git-Url: https://code.delx.au/countdown-timer/commitdiff_plain/8cab8946542106cbb66ff9164ea47cb7e1db3490 Fixed calculation of hours/minutes display --- diff --git a/timer.js b/timer.js index 4f954ab..af00ef8 100644 --- a/timer.js +++ b/timer.js @@ -72,8 +72,8 @@ var fillDisplay = function(s) { var formatTimeSecs = function(tsec) { var seconds = tsec % 60; - var minutes = Math.floor(tsec / 60); - var hours = Math.floor(theTimeoutEntry / 3600); + var minutes = Math.floor(tsec / 60) % 60; + var hours = Math.floor(tsec / 3600); return formatTimeHMS(seconds, minutes, hours); };