Abhay Kedia wrote:
> I manually set correct time using sites like worldtimezone.com.

How?  What commands do you give?

> Then, I shutdown the system and boot after a few hours. What I
> see is that Gentoo sets the system time to the same one at which
> I halted it. For example if I shutdown 4 hours ago at 14:00 hrs
> and boot at 18:00 hrs, it will still set the time to 14:00 hrs
> instead of the correct time.

Try running 'hwclock --show --debug', and run it again a bunch of 
seconds later.  Is the hardware clock ticking?

Here's a sample output:

# hwclock --show --debug
hwclock from util-linux-2.12r
hwclock: Open of /dev/rtc failed, errno=2: No such file or 
directory.
Using direct I/O instructions to ISA clock.
Last drift adjustment done at 1138395601 seconds after 1969
Last calibration done at 1138395601 seconds after 1969
Hardware clock is on UTC time
Assuming hardware clock is kept in UTC time.
Waiting for clock tick...
...got clock tick
Time read from Hardware Clock: 2006/01/27 21:04:32
Hw clock time : 2006/01/27 21:04:32 = 1138395872 seconds since 1969
Fri Jan 27 22:04:32 2006  -0.579761 seconds

If it is ticking , then set the hardware clock to the correct time 
with 'hwclock --set --date=<thistime>', then throw away the 
/etc/adjtime file.  Throw it away, as it might be the adjusting 
feature that thinks your clock is drifting a full hour per hour 
(that is: ticks away two hours in one).

> # /etc/conf.d/clock
> CLOCK="local"

Do you need the "local" time thing?  If Linux is the only OS on your 
box it's easier to use UTC.

Your time zone is set correctly?  Where is /etc/localtime linking 
to?

Benno
-- 
gentoo-user@gentoo.org mailing list

Reply via email to