diff --git a/lib/carelink/carelinkSimulator.js b/lib/carelink/carelinkSimulator.js index 0c68dff89a..16252b9910 100644 --- a/lib/carelink/carelinkSimulator.js +++ b/lib/carelink/carelinkSimulator.js @@ -70,7 +70,8 @@ function computeMillisInCurrentDay(e){ // matches a schedule, so we round to the nearest fifteen mins // to increase the chance of matching up with a schedule if (e.conversionOffset && e.conversionOffset !== 0) { - return Math.round(msFromMidnight/fifteenMinsInMs)*fifteenMinsInMs; + var result = Math.round(msFromMidnight/fifteenMinsInMs)*fifteenMinsInMs; + return result === 864e5 ? 0 : result; } return msFromMidnight; }