Categories: MSDN / DotNet / Java / Scripts / Linux / PHP Ask - La ask - La Answer

Make applet taking the server time?

Hi,
I made an applet that is actually a clock. It measures the time in different time zones by adding or substracting from the time it gets from my computer(winXP with Apache 2). The problem is that when someone else uses it, the applet already takes the current time from his computer, so the measurements it makes are not true. Is there a way to always make it take the time from the server machine(my machine) when it's opened from another computer?
[461 byte] By [mmvsbg] at [2007-11-11 6:34:25]
# 1 Re: Make applet taking the server time?
the easiest way is to supply it with the local time on the webserver via an applet property in the HTML code.
You can then use that time as a base to calculate the difference between the local time on the users computer and the timeon your server...
ractoc at 2007-11-11 22:40:59 >