Clint Jeffery wrote:
> 
> OK, if I remember it right, we recently had a discussion of finding the
> local timezone, which was finally ended when the original poster relayed a
> suggestion that our (POSIX-based) system interface actually had a portable
> method of obtaining the needed information.
> 
> Believe it or not, I have a follow-up.  My PC at home gets WAYYYY out of
> sync on its clock, and I want to write a daemon to auto-reset it once a
> day from some public Internet clock.
> 
> * What is the coolest/simplest protocol for getting the correct time
>   from a remote server?
> * What OS'es run such a server routinely?
> * Is it possible to write such a daemon, portably, in Unicon?  I see we have
>   gettimeofday but apparently not settimeofday.
> 
> All suggestions are welcome

Have a look at the NTPv4 protocol.  It's amazingly accurate (to a
precision
beyond that of most (all?) PCs and, more importantly, used by the
Internet
standard time servers.

Certainly Linux runs it routinely (RedHat provides it with their
distro.).
I use it on all my systems (linux an solaris).

A google search on "ntpd" should find tons of info on it.

(Another, simpler, protocol is described in RFC 868 and provided by
the rdate utility under Unix.  Not as accurate (not down to the
millisecond level) as NTPv4.)

-- 
Steve Wampler -- [EMAIL PROTECTED]
O sibile, si ergo.  Fortibus es enaro.
Nobile, demis trux.  Demis phulla causan dux.

_______________________________________________
Unicon-group mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/unicon-group

Reply via email to