1 |
Hello everyone, |
2 |
|
3 |
I recently had to reset my clock to a more "correct" (that may be subjective) setting. |
4 |
In your case I would set my /etc/conf.d/clock file as: |
5 |
|
6 |
CLOCK="UTC" |
7 |
TIMEZONE="US/Pacific" |
8 |
|
9 |
then I would assure that my /etc/localtime file is correct with the next command: |
10 |
|
11 |
$ cp /usr/share/zoneinfo/US/Pacific /etc/localtime |
12 |
|
13 |
If you have no zoneinfo files then consider emerging 'timezone-data'. |
14 |
The setting like that should be fine and if you have an offset it's that your hardware clock |
15 |
must be set to a time that is considered as UTC (since you have "CLOCK=UTC" in your conf) |
16 |
while it's not. |
17 |
|
18 |
So set your clock correctly with rdate, ntp whatever... |
19 |
and then write your system clock to your hardware clock (I guess this action is done at shut down). |
20 |
You may use the following command : |
21 |
|
22 |
$ hwclock --systohc |
23 |
|
24 |
Then your machine is ready to have correct time as UTC. Be sure to have your profile |
25 |
environnement variable TZ to be set to your timezone. In your .profile : |
26 |
|
27 |
export TZ="US/Pacific"; |
28 |
|
29 |
Concerning dual boot.. as I am in !! Everywhere I could see advice to set my CLOCK var to "local" |
30 |
but that's always a mess with the timezone... so the simple thing is to deactivate the Microsoft Windows |
31 |
update or at least to set it to UTC time.. |
32 |
Thus keeping CLOCK="UTC" which would be a quite good standard. |
33 |
But I understand Gentoo is installed to cause no harm to Windows, thats why there is this CLOCK="local" attitude |
34 |
I guess. |
35 |
|
36 |
Hope that helps |
37 |
I'd be happy to share the pros and the cons... |
38 |
|
39 |
-- |
40 |
Redouane BOUMGHAR |
41 |
Physics, Remote Sensing and Digital Imagery Engineer |
42 |
|
43 |
Neil Bothwick wrote: |
44 |
> On Wed, 9 May 2007 14:27:52 +0000, Grant wrote: |
45 |
> |
46 |
>> I have: |
47 |
>> |
48 |
>> -rw-r--r-- 1 root root 255 Apr 25 20:58 /etc/localtime |
49 |
>> |
50 |
>> on the laptop with the incorrect time, and the router with the correct |
51 |
>> time. |
52 |
> |
53 |
> That only tells us that /etc/localtime is a file, not which timezone data |
54 |
> it contains. Re-emerging timezone-data will ensure that it has the data |
55 |
> for the timezone you specified in /etc/conf.d/clock. |
56 |
> |
57 |
> Setting the timezone in /etc/conf.d/clock has no effect until you next |
58 |
> emerge timezone-data. A 255 byte /etc/localtime is probably either Factory |
59 |
> or localtime, i.e. nothing has been set. |
60 |
> |
61 |
> |
62 |
|
63 |
-- |
64 |
gentoo-user@g.o mailing list |