Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!mnetor!seismo!mcvax!inria!axis!philip From: philip@axis.UUCP Newsgroups: comp.unix.questions Subject: Re: Another stupid time zone question Message-ID: <229@axis.fr> Date: Sun, 10-May-87 08:50:18 EDT Article-I.D.: axis.229 Posted: Sun May 10 08:50:18 1987 Date-Received: Wed, 13-May-87 00:39:10 EDT References: <187@tness1.UUCP> Organization: Axis Digital, Paris Lines: 56 Keywords: time zone Summary: An ugly solution In article <187@tness1.UUCP>, mechjgh@tness1.UUCP writes: > > OK, I give up... where is the EST time zone coming from ? > Is it because DEC is in Maynard, Massachusettes ? No, nothing at all to do with DEC (?!). Its because Bell Labs is in New Jersey. Because of the inconsistency in setting TZ in all previous versions of UNIX, some bright spark hard-wired EST and an offset of 5 hours into the time routines in the standard C library. Thus, if you don't set TZ, it uses the default value (which I suggest should be GMT), which is EST. > All incoming mail from remote systems bears a > EST time stamp (instead of CST that I'm in). Your uucp login runs /usr/lib/uucp/uucico directly - without a shell, so, no reading of /etc/profile etc to set up a TZ. So, it has the default of EST. > Do I have to change tzname in ctime.c and recompile everything? > Or is there some easy magic. There are three solutions: 1) Change ctime.c and re-compile (YUK !) - this will make the system work for you, but is just perpetuating the stupidity. This also assumes access to the sources. 2) Easy, but slightly ugly: Don't run uucico directly. Run a shell instead, and put a .profile containing something like: TZ=CST?CST # or whatever for your TZ export TZ exec /usr/lib/uucp/uucico exit The exit is there in case of problems execing uucico, it prevents people getting a shell via a uucp login. This solution requires no source access. 3) The best solution, if you have access to the sources, is to hack init to accept another keyword, rather than running a command, it will take all the variable defines on the line and add them to the environment of ALL sub processes - and since init is the ancestor of all processes, everyone gets these variables. For example: ev::environ:TZ=MET-1MET This sets TZ correctly for all processes on our machine. You can throw away all those stupid TIMEZONE files etc. Philip