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

Re: Auto updating the hardware clock on shutdown.

In article <[🔎] 87afn399bi.fsf@nevermore.csres.utexas.edu>,
Rob Browning <osiris@cs.utexas.edu> wrote:
>I assumed that the hardware clock was always written to reflect the
>current system time on shutdown.  Is that true?

No, nothing touches the hardware clock until you tell it to (with clock(8)).

>The reason I ask is
>because we just had the daylight savings switch here, and at least one
>of my systems came up after a reboot with the wrong time (it was an
>hour off).  If the clock is not by default written at shutdown, what's
>the best way to make sure that it is, an appropriate rc.d script

You don't _need_ to write the clock at shutdown time. If you set your CMOS
clock to GMT, and use the right timezone settings everything will go
automatically. Make sure that you configure the GMT= statement in
/etc/init.d/boot correctly so that the system clock gets initialized correctly
on bootup.

Now what might have happened is that you have your CMOS clock running on GMT.
Some BIOSes try to be smart and update the CMOS clock when you boot if they
see DST has come into effect since the latest reboot.. You should be able to
turn that off. If not, you loose :)

Myself I have my clock running on local time, and let the BIOS do it's DST
update. I need to boot DOS/windows sometimes. But it works fine with
GMT="" in /etc/init.boot, and no problems with DST.


Reply to: