bug-coreutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Time sync


From: Bob Proulx
Subject: Re: Time sync
Date: Sat, 16 Feb 2008 15:04:02 -0700
User-agent: Mutt/1.5.13 (2006-08-11)

Fred . wrote:
> I was thinking of like running date without a daemon, such as;
> $ date --sync time-a.nist.gov

Stepping the time like that is trouble because it means that some
system times will be seen twice and other system times will be
skipped.  Cron tasks that are meant to trigger on a particular second
won't happen and others will happen twice at close to the same time.
It plays havoc with programs that check the time while running.

Take my advice and don't do it! :-)

Having said that it is typical to step the time at system boot.  At
that time processes have yet to start running and it is best to get
the time set before they do.  If networking is available at boot time
most systems will set the time from the pool of ntp servers.  The
'ntpdate' command is usually used in this context.  Recently ntpdate
was obsoleted and all of the its functionality is now available in the
ntpd program.  See the 'ntpd -q' option for more information.

> But maybe you're right. Date should be simple, and I can use ntpd instead.

The better way as done by ntpd is to adjust the clock ticks per second
such that some system seconds are shorter or longer than others in
order to keep the time in line with the outside world.  In this way
every system time will be seen with none skipped and none twice.

Bob




reply via email to

[Prev in Thread] Current Thread [Next in Thread]