eso mejor hacerlo con javascript en el cliente. así:
Código:
<script language="javascript">
function cambiahora()
{
var now = new Date();
var hour = now.getHours();
var minute = now.getMinutes();
var second = now.getSeconds();
var ap = "AM";
if (hour > 11) { ap = "PM"; }
if (hour > 12) { hour = hour - 12; }
if (hour == 0) { hour = 12; }
if (hour < 10) { hour = "0" + hour; }
if (minute < 10) { minute = "0" + minute; }
if (second < 10) { second = "0" + second; }
var timeString = hour +
':' +
minute +
':' +
second +
" " +
ap;
document.formulario.avisohora.value=timeString;
document.formulario.salidahora.value=timeString;
}
</script>
<form name="formulario">
<select name="menu1" onChange="javascript:cambiahora()">
<option>ROJO</option>
<option>VERDE</option>
</select>
<input name="salidahora" type="text">
<input name="avisohora" type="text"></form>
</script>