i want a live updated clock for my Server time. basicly its refreshing the date('H:i:s T'); but i cannot get it working.
it should be updated in:
<div id="clock"> </div>
the function i created looks like that:
<script>
function digitalClock() {
var hrs;
var mins;
var tsecs;
var secs;
hrs = <?php echo date('H')?>;
mins = <?php echo date('i')?>;
secs = <?php echo date('s')?>;
var ctime = hrs + ":" + mins + ":" + secs + " CEST";
document.getElementById("clock").firstChild.nodeValue = ctime;
}
window.onload = function() {
digitalClock();
setInterval(digitalClock, 1000);
}
</script>
So actually its putting out the correct time but its not updating at all.
if anyone could help i would really appreciate.
If someone could explain how i could make it WITH my CEST Timezone in javascipt, that would be awesome.