Re: Changing HW clock to GMT?
Tim Thomson <email@example.com> writes:
> I want to set my hardware clock to GMT. I answered no in the question
> when setting up my system, so my HW clock would be local time. I now want
> to set it to GMT so I don't have to change it when daylight savings kicks
Look in /etc/init.d/boot. There should be a line setting the variable
GMT which is later used in a call to clock. Just set that variable to
"-u" instead of "".
Be certain to do a 'clock -u -w' before you shut your system down!
(immediately after you make this change to /etc/init.d/boot, perhaps?)
> Also, what tool syncs the hardware clock to the system time? I set my
> system time using netdate, in my ip-up and would like to set my HW clock
> to that and keep it synced. Using clock -w works, but is a pain.
> I must look at adjtimex again, rather than just using netdate.
clock -w is a pain? (and, if your hardware clock is now in universal
time, you should use "clock -u -w") Why can't you just put a "clock
-u -w" statement in your ip-up script right after the call to netdate?
Alternatively, I suppose that you could synchronize your hardware
clock to your software clock by adding a "clock -u -w" statement to
/etc/init.d/halt, preferably somewhere near the beginning. That way,
your hardware clock would be written each time your machine rebooted
or was shut down - since the value in the hardware clock is usually
used only at boot time, this would seem to be enough. I'd still put
the clock statement in the ip-up script too, though, to keep the
hardware clock synched in case of unexpected power outages.
TO UNSUBSCRIBE FROM THIS MAILING LIST: e-mail the word "unsubscribe" to
Trouble? e-mail to firstname.lastname@example.org .