View Full Version : modification of time format

04-16-2005, 11:33 PM
This should be simple:
How do i modify the javascript to display the time in the same format the the "echo date" part? (php g:i:s A)

<title>Dynamic Time</title>
<script type="text/javascript">
servertime = <?= time() ?>;
usertime = new Date();
useroffset = servertime - usertime;

function showtime(){
d=new Date(Number(new Date())+useroffset);

<body onload="setInterval('showtime()',250)">

<span id="dyntime">
echo date('g:i:s A <\a\c\r\o\n\y\m \t\i\t\le=\"\P\a\c\i\f\i\c \S\t\a\n\d\a\r\d \T\i\m\e (-0800)\">[\P\S\T]</\a\c\r\o\n\y\m>', time() - (7200));


I found this script here ( and modified it a little bit.


[edit] problem solved! (i used a different script) thanks if you tried to help

EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum