[comp.unix.questions] stupid time zone question

rachiele@nadc.arpa (05/08/87)

On system V machines, to get the time zone to come up right all you have
to do is properly set the TZ parameter.  The file /etc/profile is executed
when every user logs in, so this is the normal place to do it.  Find where
the TZ variable is set to EST5EDT, this is most likely what you get when
you buy unix, and change it to CST6CDT which is what I assume you need.
(I am assuming you use daylight savings time?  otherwise RTFM).
   If a user of your system doesn't like the central time default he can
override it by puting the TZ variable into his personal .profile file in
his home directory.

        OK?
      Jim
      rachiele@nadc.arpa

guy%gorodish@Sun.COM (Guy Harris) (05/08/87)

> On system V machines, to get the time zone to come up right all you have
> to do is properly set the TZ parameter.  The file /etc/profile is executed
> when every user logs in, so this is the normal place to do it.

This makes a couple of unwarranted assumptions:

	1) Every process on the system is run as the result of a
	   login or from an "rc" file that had TZ set in it.

	2) Every account on your machine has "/bin/sh" or the Korn shell
	   as its login shell.

There are several fairly obvious (except, perhaps, to the genius at
AT&T who came up with the TZ scheme and didn't arrange to have "init"
set TZ) exceptions to 2): accounts running some special application
and accounts running - yup - "uucico".  Now, consider that incoming
mail often arrives via UUCP....

Now, maybe HoneyDanBer has some stuff to arrange to set TZ in the
absence of an adequate "init"; the S5R3 one doesn't, but S5R3 finally
has an adequate "init" that sets TZ.

det@herman.UUCP (Derek Terveer) (05/10/87)

In article <7299@brl-adm.ARPA>, rachiele@nadc.arpa writes:
> On system V machines, to get the time zone to come up right all you have
> to do is properly set the TZ parameter.  The file /etc/profile is executed

I have done that with our /etc/profile and it works just fine -- for all the
users who login in run level 2.  But, we have a crontab line that echoes out
the date every 20 minutes to the system console and it always comes out in EDT.
I'm assuming that TZ getting set is fine for all users who subsequently login
and read the /etc/profile, but how do i get the processes spawned before init 2
to have the correct TZ?