[lug] Time zone grumbling

D. Frye dafr at dafr.us
Thu Mar 30 22:38:54 MST 2006


On Thu, Mar 30, 2006 at 08:57:24PM -0700, Daniel Webb wrote:
} I'm not sure if my problems right now are a symptom of Debian or the Linux
} world in general, but I've been using Linux for 7 years now and I have yet to
} see a sensible and consitent description and/or implementation of time on
} Linux.  For example, I chose (unwisely) the "use UTC" option when I installed
} a new Debian.  Now the "UTC" time gives the local time and the "local" time
} gives UTC-7.  So I should be able to change that, right?
} 
} $apropos timezone
} tzconfig (8)         - set the local timezone
} tzselect (1)         - view timezones
} tzsetup (8)          - set the local timezone
} 
} Hm.  Three ways to change the time zone, not to mention another one in KDE.
} All of which fail to address this problem.  KDE's clock has screwed up my time
} zone so many times I won't even touch it any more.
} 
} So, is there any place on the net that actually explains all the dozen or so
} config files and ways to configure the time on Linux?

Alright, I just went through this excercise with RHEL 3, and found some
really messed up logic in the Red Hat implementation of timezones. Just
for the record, though, I run Debian at home. Here is what I can offer
you with respect to Debian.

tzconfig -- sets the timezone for the server by making a symlink from
	/etc/localtime to the desired location; in my case it points to
	/usr/share/zoneinfo/America/Denver

tzselect -- provides the user with a menu to figure out what to use in
	their .profile to show time in their desired timezone

The "use UTC" option should only tell the system to read and save the
time to BIOS as UTC. This is reportedly a bad choice for a dual boot
system running Windows.

Now, back to the problems I found with the RHEL 3 implementation....

First, RHEL does not offer a tzconfig binary (on this server at least),
and I was manually editing the /etc/sysconfig/clock file and later using
the redhat-config-* utilities. Second, the use of /etc/localtime is NOT
a symlink to the desired place, it appears to be a copy of the data
file. Third, I was unable to find a convenient way to set the timezone
to GMT (I might have missed it in the menu list).

The lesson I learned from this exercise was that because it was an actual
data file, and with no simple way to choose the UTC timezone, it was
simpler for me to just remove the /etc/localtime file and create my own
symlink which is all that tzconfig typically does in the first place.

Hope this helps.

-- 

D. Frye
dafr AT dafr.us
http://www.dafr.us/dafr




More information about the LUG mailing list