Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10.1 6/24/83; site hou3c.UUCP Path: utzoo!watmath!clyde!burl!hou3c!ka From: ka@hou3c.UUCP (Kenneth Almquist) Newsgroups: net.unix-wizards,net.bugs.usg Subject: Re: TZ Rationalization Requested Message-ID: <408@hou3c.UUCP> Date: Tue, 13-Mar-84 14:06:41 EST Article-I.D.: hou3c.408 Posted: Tue Mar 13 14:06:41 1984 Date-Received: Wed, 14-Mar-84 08:16:33 EST References: <341@dual.UUCP> Distribution: net Organization: Bell Labs, Holmdel, NJ Lines: 25 One reason for using the TZ variable is to avoid the need for yet another system call. Eric raises two objections to the use of TZ: The fact that it is in an environment variable now makes life difficult for programs that are spawned from /etc/init (e.g. getty), and the SA's have to remember to add TZ=PST8PDT; export TZ to the top of their /etc/rc file. Login has to be fixed to either get it from some file, or try and find it in the enviroment passed to it (where it won't be, since init doesn't have an environment, and init spawns getty). I have never found this to be a problem, although I can see that it might be for some people. As delivered, getty and login do not need to know the time zone. It would probably be better to have TZ set by init. To make the TZ `take', you have to call tzset(); If this is true in System III (and it's not in System V; I just looked at the source), the fix should be trivial. Just add a call to tzset() at the beginning of the localtime routine. Kenneth Almquist