TZ Rationalization Requested

Kenneth Almquist ka at hou3c.UUCP
Wed Mar 14 05:06:41 AEST 1984


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



More information about the Comp.unix.wizards mailing list