Ver Mensaje Individual
  #10 (permalink)  
Antiguo 16/01/2003, 15:37
Avatar de Giondo
Giondo
 
Fecha de Ingreso: diciembre-2002
Ubicación: en algun lugar del mundo
Mensajes: 565
Antigüedad: 21 años, 4 meses
Puntos: 0
bueno aca les dejo el que me funciona bien.. y limpito (bue lo mas limpio que pude )


Código PHP:

<html>
<head>
<title>clock</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<script language="JavaScript">
// Note: m-1 to account for javascript Date() syntax
var timesetter = new Date(<?php echo gmdate("Y,m-1,d,H,i,s");?>);
var day = new Array('Domingo', 'Lunes', 'Martes', 'Miercoles', 'Jueves', 'Viernes', 'Sabado');
var month = new Array('January', 'February', 'March', 'April', 'May', 'June', 'July', 'August', 'September', 'October', 'November', 'December'); 
var ZoneOffsetMSeconds = timesetter.getTimezoneOffset()*60*1000;
// adjust time to client's time zone
// Note: client might have bad time zone settings
timesetter.setTime(timesetter.getTime()-ZoneOffsetMSeconds);
var TimeNow = "";
function MakeTime(){
    setTimeout("MakeTime();",1000);
    timesetter.setTime(timesetter.getTime()+1000);
    var mthN = String(timesetter.getMonth());
    var mth = month[mthN];
    var mthday = String(timesetter.getDate());
    var yrN = String(timesetter.getFullYear());
    var dayN = String(timesetter.getDay());
    var dd = day[dayN];
    var hhN  = timesetter.getHours();
    if(hhN > 12){
       var hh = String(hhN - 12);
       var AP = " PM";
    }else if(hhN == 12){
       var hh = "12";
       var AP = " PM"; 
    }else if(hhN == 0){
       var hh = "12";
       var AP = " AM";     
    }else{
       var hh = String(hhN);
       var AP = " AM";
    }
    var mm  = String(timesetter.getMinutes());
    var ss  = String(timesetter.getSeconds());
    TimeNow =  dd +((hh < 10) ? " " : "") + hh + ((mm < 10) ? ":0" : ":") + mm + ((ss < 10) ? ":0" : ":") + ss + AP + "  " + mth + " " + mthday + ", " + yrN ;
    return TimeNow;
}// end function MakeTime

function ShowClock(){
setTimeout("ShowClock();",1000);
var Inicio, Reloj, Final, Total;
Inicio = "<font size=3 color=#000000>";
Reloj = TimeNow
Final = "</font>";

Total = Inicio + Reloj + Final;

document.getElementById("clock").innerHTML = Total;

}// end function ShowClock

</script>
</head>
<body bgcolor="#FFFFFF" text="#000000" onLoad="MakeTime(); ShowClock()" >
</div>
<div id="clock"> </div>
</body>
</html>
salu2
__________________
Welcome to The Human Race