Gentoo Archives: gentoo-server

From: Andrew Cowie <andrew@×××××××××××××××××××.com>
To: gentoo-server@l.g.o
Subject: Re: [gentoo-server] UTC vs. localtime
Date: Thu, 11 Aug 2005 04:25:03
Message-Id: 1123728674.8597.16.camel@procyon.operationaldynamics.com
In Reply to: [gentoo-server] UTC vs. localtime by Robert Larson
1 On Tue, 2005-09-08 at 11:58 -0500, Robert Larson wrote:
2 > I just recently switched a few of my servers to UTC from localtime
3
4 My sense is that the responses you received in this thread, while
5 helpful, sorta missed the point.
6
7 There's no reason for a server to have any system-wide timezone other
8 than UTC, so yes,
9
10 > /etc/conf.d/clock: CLOCK="UTC"
11 > /etc/localtime -> /usr/share/zoneinfo/UTC
12
13 is correct. In fact, setting the hardware clock to UTC is most correct
14 for any Linux system - the only tie to mess with it is if the Linux
15 installation on a machine co-exists with a broken OS, say, Windows
16 perhaps.
17
18 But here's the real trick: *any* individual application can localize the
19 timezone information it gets by [re]setting the TZ environment variable.
20 And that should be all you have to worry about.
21
22 An example of that in action is slashtime, my timezone tool; see
23 http://www.operationaldynamics.com/time and the underlying code at
24 http://research.operationaldynamics.com/projects/scripts/#slashtime
25 It really isn't much more than resetting the TZ variable for various
26 timezones I'm interested in, and then calling strftime() a bunch.
27
28 AfC
29 Canberra
30
31
32 [P.S. You may have to recorrect the hardware clock *once*, see `hwclock
33 --help`. Also, be aware that NTP will only act if the skew is within
34 certain limits, so if you're way out, it won't do anything]
35
36 --
37 Andrew Frederick Cowie
38 Managing Director
39 Operational Dynamics Consulting Pty Ltd
40
41 http://www.operationaldynamics.com/
42 Management Consultants specializing in strategy,
43 organizational architecture, procedures to survive
44 change, and performance hardening for the people
45 and systems behind the mission critical enterprise.
46
47 Operating Worldwide:
48
49 Sydney +61 2 9977 6866
50 New York +1 646 472 5054
51 Toronto +1 416 848 6072
52 London +44 207 1019201
53
54 --
55 gentoo-server@g.o mailing list

Replies

Subject Author
Re: [gentoo-server] UTC vs. localtime Benjamin Smee <strerror@g.o>