Red Hat Bugzilla – Bug 438337
Wrong usage of hwclock in /etc/rc.d/init.d/halt
Last modified: 2014-03-16 23:13:05 EDT
Description of problem:
Somewhere at the beginning of March 2008 I've noticed that after boot the time
is not correct, but I'm rebooting rarely to be annoyed too much. Today I've
tried to find what is the reason for this. The time after boot is 2 hours ahead.
In fact GMT+2 hours is my current timezone (EET). It appears that the system
time is set from /etc/rc.d/init.d/halt using options from /etc/sysconfig/clock.
What it shows for me is:
Which means the hardware clock is not in UTC, at least this was the meaning for
/etc/rc.d/init.d/halt is using this to figure out what time to set:
case "$UTC" in
which shows that for me the options used will be:
CLOCKFLAGS=" --systohc --localtime"
If I understand correctly from the man page of hwclock this means that hwclock
will think that the hardware clock is kept in UTC which is not correct.
For the proof I've performed couple reboots and the time after every reboot
advanced 2 hours ahead.
I think the case with $UTC must be vice versa, eg:
case "$UTC" in
Version-Release number of selected component (if applicable):
initscripts-8.65-1.i386 have this problem. I think couple of the last versions
too beginning from March at least.
halt shouldn't be using /etc/sysconfig/clock at all.
You may want to check your /etc/adjtime file to make sure that the right value
is on line 3 (UTC or LOCAL)