Gentoo Archives: gentoo-server

From: Ron Bickers <rbickers-list-gentoo-user@××××××××.com>
To: gentoo-server@l.g.o
Cc: Robert Larson <robert@×××××××××.com>
Subject: Re: [gentoo-server] UTC vs. localtime
Date: Tue, 09 Aug 2005 18:24:44
Message-Id: 200508091419.50773.rbickers-list-gentoo-user@logicetc.com
In Reply to: [gentoo-server] UTC vs. localtime by Robert Larson
1 On Tue August 9 2005 12:58 pm, Robert Larson wrote:
2
3 > I just recently switched a few of my servers of to UTC from localtime due
4 > to an new application deployment relying on UTC time.
5
6 Your new application should be able to work the way you had it before. If it
7 requires your local timezone to be UTC, it was poorly designed; complain to
8 the developers.
9
10 > This is what I changed:
11 > /etc/conf.d/clock: CLOCK="UTC"
12 > /etc/localtime -> /usr/share/zoneinfo/UTC
13
14 This says your hardware clock is set to the UTC time, and your local timezone
15 is also UTC. That's why you're not getting the right local time.
16
17 > It was:
18 > /etc/conf.d/clock: CLOCK="local"
19 > /etc/localtime -> /usr/share/zoneinfo/<my timezone>
20
21 This is the correct way to configure the clock if your hardware clock is set
22 to the local time.
23
24 > I have another machine that does reflect the proper time, and it is set as
25 > follows:
26 > /etc/conf.d/clock: CLOCK="UTC"
27 > /etc/localtime -> /usr/share/zoneinfo/<my timezone>
28
29 This is the correct way to configure the clock if your hardware clock is set
30 to UTC time. The correct adjustment will be made from the hardware clock
31 when it needs the local time.
32
33 > Is it possible that I
34 > just need to set the clock? If so, does that mean ntpclient and ntpd
35 > either haven't been doing their job, or their syncing to the wrong
36 > timezone?
37
38 If you set CLOCK="UTC", the hardware clock will get set to the same thing no
39 matter what your /etc/localtime is. However, you need to correctly set your
40 timezone so you will get the correct local time.
41
42 You should check the man pages on this to be sure, but NTP will not adjust
43 the clock by more than a certain amount at once, so you may need to set it
44 manually with 'date' to something close to the current time.
45
46 Hope this helps.
47
48 --
49 Ron
50 --
51 gentoo-server@g.o mailing list

Replies

Subject Author
Re: [gentoo-server] UTC vs. localtime Ben Munat <bent@×××××.com>