On Wed, Aug 28, 2019 at 12:25:32PM -0500, David Wright wrote:
On Mon 12 Aug 2019 at 08:38:47 (-0400), Greg Wooledge wrote:
The first one is the /etc/timezone file, which as you say, is a
simple text file that a (root) user can edit.  I believe this is the
backward-compatibility one.

And that's the one I find useful, in that a lot of applications honour
a value for TZ, which needs to be the text version. I always have a
link to /etc/timezone as ~/.timezone, and TZ is set to its value in
my startup files, which makes it easy to run a session in a
contradictory timezone if I wish.

The second one is the /etc/localtime symbolic link, which needs to point
to an existing binary time zone data file in /usr/share/zoneinfo.  The
symbolic link can be re-pointed by hand; the binary data file should not
be edited by hand.

I assume the system is interested in this one because it needs the
actual rules and not just the name of the timezone. Otherwise the
system wouldn't be able to junp the clocks at the appropriate times.

You're making a distinction that doesn't exist. The text value in TZ or /etc/timezone should match a filename in /usr/share/zoneinfo. If it doesn't then you'll get inconstent dates. There's a POSIX spec for encoding quite a lot of information into TZ, but that's practically obsolete.

Reply via email to