Gentoo Archives: gentoo-user

From: Benno Schulenberg <benno.schulenberg@×××××.com>
To: gentoo-user@l.g.o
Subject: Re: [gentoo-user] Wrong time on reboot. Not a CMOS battery problem.
Date: Fri, 27 Jan 2006 21:31:31
Message-Id: 200601272225.33369.benno.schulenberg@gmail.com
In Reply to: [gentoo-user] Wrong time on reboot. Not a CMOS battery problem. by Abhay Kedia
1 Abhay Kedia wrote:
2 > I manually set correct time using sites like worldtimezone.com.
3
4 How? What commands do you give?
5
6 > Then, I shutdown the system and boot after a few hours. What I
7 > see is that Gentoo sets the system time to the same one at which
8 > I halted it. For example if I shutdown 4 hours ago at 14:00 hrs
9 > and boot at 18:00 hrs, it will still set the time to 14:00 hrs
10 > instead of the correct time.
11
12 Try running 'hwclock --show --debug', and run it again a bunch of
13 seconds later. Is the hardware clock ticking?
14
15 Here's a sample output:
16
17 # hwclock --show --debug
18 hwclock from util-linux-2.12r
19 hwclock: Open of /dev/rtc failed, errno=2: No such file or
20 directory.
21 Using direct I/O instructions to ISA clock.
22 Last drift adjustment done at 1138395601 seconds after 1969
23 Last calibration done at 1138395601 seconds after 1969
24 Hardware clock is on UTC time
25 Assuming hardware clock is kept in UTC time.
26 Waiting for clock tick...
27 ...got clock tick
28 Time read from Hardware Clock: 2006/01/27 21:04:32
29 Hw clock time : 2006/01/27 21:04:32 = 1138395872 seconds since 1969
30 Fri Jan 27 22:04:32 2006 -0.579761 seconds
31
32 If it is ticking , then set the hardware clock to the correct time
33 with 'hwclock --set --date=<thistime>', then throw away the
34 /etc/adjtime file. Throw it away, as it might be the adjusting
35 feature that thinks your clock is drifting a full hour per hour
36 (that is: ticks away two hours in one).
37
38 > # /etc/conf.d/clock
39 > CLOCK="local"
40
41 Do you need the "local" time thing? If Linux is the only OS on your
42 box it's easier to use UTC.
43
44 Your time zone is set correctly? Where is /etc/localtime linking
45 to?
46
47 Benno
48 --
49 gentoo-user@g.o mailing list

Replies

Subject Author
Re: [gentoo-user] Wrong time on reboot. Not a CMOS battery problem. Abhay Kedia <abhay.ilugd@×××××.com>
Re: [gentoo-user] Wrong time on reboot. Not a CMOS battery problem. Abhay Kedia <abhay.ilugd@×××××.com>