Andrew Boyson / web

Dependents:   oldheating gps motorhome heating

Revision:
22:f45bbb468439
Parent:
21:048b7dbdf0aa
Child:
23:f340b48d0538
--- a/http-clock-script.inc	Wed Jan 09 12:25:08 2019 +0000
+++ b/http-clock-script.inc	Wed Jan 09 18:22:56 2019 +0000
@@ -37,8 +37,8 @@
 "   msRtc          += rtcDate.getTime();\n"
 "   msDiff          = msRtc - Date.now();\n"
 "   msCountAtRtcSet = msCount;\n"
-"   rtcIsSet        = hexToBit(4, 0)\n"
-"   clockIsSet      = hexToBit(4, 1)\n"
+"   rtcIsSet        = hexToBit(4, 0);\n"
+"   clockIsSet      = hexToBit(4, 1);\n"
 "   sourceIsOk      = hexToBit(4, 2);\n"
 "   rateIsLocked    = hexToBit(4, 3);\n"
 "   timeIsLocked    = hexToBit(5, 0);\n"
@@ -103,7 +103,7 @@
 "    var now       = new Date(msCount - msCountAtRtcSet + msRtc);\n"
 "    var leapStart = new Date(leapyear, leapmonth - 1, 1, 0, 0, leapBackward ? -1: 0);\n"
 "    \n"
-"    if (now < leapStart) return; //Do nothing until reached the leap start\n"
+"    if (now.getTime() < leapStart.getTime()) return; //Do nothing until reached the leap start\n"
 "    \n"
 "    if (leapBackward) { msRtc += 1000; leaps -= 1; } //skip   59\n"
 "    else              { msRtc -= 1000; leaps += 1; } //repeat 59\n"