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

Re: How to set time



On 28 Jul 2004, s. keeling wrote:
> Incoming from Alvin Oga:
> > On Wed, 28 Jul 2004, Paul Johnson wrote:
> > 
> > > > 	root#  hwclock --systohc
> > > >
> > > > reboot and test that time is set correctly ..
> > > 
> > > Forgot part two:
> > > 
> > > apt-get install chrony
> > 
> > nah .. i figured if one couldn't figure out/find "date" ...
> 
> Speaking of date, can anyone explain how --adjust works?  I do:
> 
>   date -s '+Sat Jul 28 14:23:25 UTC 2004'
>   hwclock --adjust
>   hwclock --systohc
> 
> Is that how it's supposed to be used to update /etc/adjtime to
> calculate drift?
> 
> I'd rather do it myself instead of relying on chrony/ntpd.
> 

It's explained pretty well in the man page for adjtimex. I've managed to
get my clock almost exactly on time - 1 or 2 seconds a week. I followed
the instructions in the man page, though without trying to  calculate it
in detail; just using trial and error. First you set the -t value to get
it approximately right, and then fine-tune it with -f. (I'm sure one
could do it more elegantly, but this does work.)

One important thing: in Debian, you make the settings in
/etc/default/adjtimex and then do /etc/init.d/adjtimex restart.

Anthony

-- 
ac@acampbell.org.uk    ||  http://www.acampbell.org.uk
using Linux GNU/Debian ||  for book reviews, electronic 
Windows-free zone      ||  books and skeptical articles



Reply to: