using the date command
mlt01 at mlists.homeunix.com
Sun Sep 30 18:36:52 PDT 2007
On Sun, 30 Sep 2007 16:17:30 -0700
jekillen <jekillen at prodigy.net> wrote:
> On Sep 30, 2007, at 12:48 AM, Bruce Cran wrote:
> > ntpdate is deprecated, you should use "ntpd -q" instead if you want
> > ntpd to set the time once then exit. From ntpdate(8):
> > Note: The functionality of this program is now available in the
> > ntpd(8) program. See the -q command line option in the ntpd(8)
> > page. After a
> > suitable period of mourning, the ntpdate utility is to be
> > retired from
> > this distribution.
> > Also, ntpd wil refuse to update the time if the delta is more than
> > 1000s by default, but you can use the -g option to override this.
> > To set the date to within a reasonable delta, use something like
> > "date 200709282027". If you want to set the time more accurately
> > using NTP, edit /etc/ntp.conf and add "server pool.ntp.org" to it.
> > Save it then run "ntpd -q".
And if you then add
to rc.conf, it will all work automatically thereafter. ntpdate will run
at boot-time followed by ntpd.
The removal of ntpdate is something I'll believe in when it happens.
ntpd -q is a superior drop-in replace for ntpdate when it's being run
from cron. OTOH if you run ntpd -q in place of ntpdate at boot (before
starting ntpd), it adds about 15 seconds to the boot-time for no
More information about the freebsd-questions