This content has been marked as final. Show 5 replies
Rather than do multiple calls, why not get the servertime once and then compare it to localtime to find the difference between the two. Then just display the local time +- the difference...?
Thanks for reply , I'll tried that, but run into problems with daylight saving time.
The Date object handles daylight saving time differently depending on the operating system and the Flash Player version. That is according to Adobe.
ok...depending on the absolute accuracy you need, how about this...
why not get the date/time say every 60 seconds using setInterval as your timer
something like this
// call getdate to get the initial datetime
// clear any interval timers
// get and display your date
servertime = eval("servertime");
MyTime = unescape("Server Time is: "+servertime);
// recall this function in 60 seconds
mynewdate = setInterval(getdate,60000)
You don't need your loop then and can then modify the date display to show 10:45 without the seconds.
If you want it with seconds then reduce the 60000 to 1000, but I don't think Flash will be able to cope, as if the loading takes longer than a second it maynever get round to displaying the text?!
hope this helps
Many, many thanks,
That would solve my problem,
You are the best.
glad to be of help