Fixed a time bug
authorRuss Handorf <rhandorf@handorf.org>
Tue, 24 May 2016 03:53:33 +0000 (23:53 -0400)
committerRuss Handorf <rhandorf@handorf.org>
Tue, 24 May 2016 03:53:33 +0000 (23:53 -0400)
php/index.php

index 396204f21be57390c43fcd9f85828cd8fe8a9234..cb52d190da14ada049b72b5fd470cc407ae9d318 100644 (file)
@@ -190,9 +190,9 @@ function get_time() {
 
 function update_time() {
   ntpcounter=ntpcounter+1;
-  date.setSeconds(date.getSeconds() + 1);
   document.getElementById("updatetime").innerHTML = (date);
-  if (ntpcounter>3600) {
+  date.setSeconds(date.getSeconds() + 1);
+  if (ntpcounter>600) {
     ntpcounter=0;
     get_time();
   }