[LON-CAPA-cvs] cvs: loncom /html/res/adm/pages menu.html

www lon-capa-cvs@mail.lon-capa.org
Fri, 24 May 2002 20:43:12 -0000


www		Fri May 24 16:43:12 2002 EDT

  Modified files:              
    /loncom/html/res/adm/pages	menu.html 
  Log:
  Prefix " " and "0" to hours, mins, and secs
  
  
Index: loncom/html/res/adm/pages/menu.html
diff -u loncom/html/res/adm/pages/menu.html:1.55 loncom/html/res/adm/pages/menu.html:1.56
--- loncom/html/res/adm/pages/menu.html:1.55	Fri May 24 15:45:14 2002
+++ loncom/html/res/adm/pages/menu.html	Fri May 24 16:43:12 2002
@@ -4,7 +4,7 @@
 Remote Control
 
 //
-// $Id: menu.html,v 1.55 2002/05/24 19:45:14 www Exp $
+// $Id: menu.html,v 1.56 2002/05/24 20:43:12 www Exp $
 //
 // Copyright Michigan State University Board of Trustees
 //
@@ -105,7 +105,13 @@
 
 function advanceclock() {
     clock.setTime(clock.getTime()+1000);
-    statusbot=clock.getHours()+':'+clock.getMinutes()+':'+clock.getSeconds();
+    var secs=""+clock.getSeconds();
+    if (secs.length<2) { secs="0"+secs; }
+    var mins=""+clock.getMinutes();
+    if (mins.length<2) { mins="0"+secs; }
+    var hours=""+clock.getHours();
+    if (hours.length<2) { hours=" "+hours; }
+    statusbot=hours+':'+mins+':'+secs;
     if (!dislocked) { display(); }
     setTimeout('advanceclock();',1000);
 }