|
Posted by Andy Dingley on 12/04/68 11:45
On Wed, 19 Apr 2006 10:10:35 -0700, Captain Dondo <yan@NsOeSiPnAeMr.com>
wrote:
>I want to display a
>page with the system time and date - not the client time and date, but
>the server time and date.
In general, don't do this. There are plenty of clocks around already -
you don't need to stretch web protocols to be one too. Look at using
NTP clients to keep the time synched, if accuracy is a problem. Of
course you might be building a kiosk app, so we can't say for certain
that you shouldn't do this.
You can display client-side time and date, set accurately from the
server. Then it's up to the client side to keep ticking while the page
is displayed - of course you can refresh the page at intervals.
You can also build a client-side clock using AJAX that refreshes itself
from the server time. That's a little more client-side work, but neater.
Or you can embed an ActiveX control that reads this directly from an NTP
server (Network Time Protocol) and displays it. I used one years ago,
but can't remember if I bought it or built it. This is ugly (ActiveX)
for public access, but OK for intranets.
It might even be possible to build an NTP client out of AJAX....
Navigation:
[Reply to this message]
|