<html>
<head>
<title>ScriptBrasil</title>
<script language="javascript">
var timerID = null
var timerRunning = false
function stopclock(){
if(timerRunning)
clearTimeout(timerID)
timerRunning = false
}
function startclock(){
stopclock()
showtime()
}
function showtime(){
var now = new Date()
var hours = now.getHours()
var minutes = now.getMinutes()
var seconds = now.getSeconds()
var month = now.getMonth()
var datum = now.getDate()
var year = now.getYear()
var timeValue = ((hours > 12) ? hours - 12 : hours)
timeValue += ((minutes < 10) ? "0" : "") + minutes
timeValue += (hours >= 12) ? " pm" : "am"
document.form1.hora.value = timeValue
timerID = setTimeout("showtime()",1000)
timerRunning = true
}
</script>
</head>
<BODY onLoad="startclock()">
<FORM NAME="form1">
<INPUT TYPE="text" NAME="hora" SIZE=8 VALUE ="">
</FORM>
</BODY>
</html>
ele funciona perfeitamente! só menos por um problema, eu estou trabalhando com PHP e preciso que ele armazene SEMPRE horas com 6 algarismos, por exemplo, agora seria (02:19 am) ele teria que armazenar (0219am) sempre com um zero na frente... mas ele esta retirando o zero da frente do 2, issu faz com que de erro no script em PHP, tem algum jeito dele SEMPRE mostrar o zero na frente quando o numero for menor que 10?