[comp.sys.sgi] Bug in /etc/cshrc

meyer@gorgo.ifi.unizh.ch (Urs Meyer) (03/29/90)

In Europe daylight-saving time (DST) has taken effect last weekend. 
I figured out (timezone(4)) how correctly to setup TZ for European
users.  For my country (+1 hour GMT) TZ should be set to something like:

    TZ="CET-1CDT-2;83,300"

in /etc/TIMEZONE.  83,300 means switch to DST on the 83th day of the
year and switch back on the 300th day.  Yes, I know, we will switch back 
earlier, but I don't know the date. (anybody tell me the correct date...)
Note: quotes are needed because of the semicolon in the string.

/etc/cshrc uses sed to filter out the string in order to setup its own
TZ environment variable.  But it copies the double quotes as well which
leads to an erroneous value.  The following fixes the problem:

Change the line beginning with   setenv TZ   in /etc/cshrc to:

    setenv TZ `sed -n -e '/^TZ=/s/\"//g' -e '/^TZ=/s/TZ=//p' /etc/TIMEZONE`

                      ^^^^^^^^^^^^^^^^^^ this has been inserted

---
Urs Meyer ---------- meyer@ifi.unizh.ch, {uunet,...}!mcsun!cernvax!unizh!meyer
University of Zurich, Dept of Computer Science, Multimedia Lab, CH-8057 Zurich