Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10.3 4.3bsd-beta 6/6/85; site wlbr.UUCP Path: utzoo!watmath!clyde!burl!ulysses!allegra!mit-eddie!genrad!decvax!decwrl!nsc!voder!wlbr!jm From: jm@wlbr.UUCP (James Macropol) Newsgroups: net.bugs.usg Subject: System V cron problem (with fix) Message-ID: <405@wlbr.UUCP> Date: Wed, 8-Jan-86 16:05:51 EST Article-I.D.: wlbr.405 Posted: Wed Jan 8 16:05:51 1986 Date-Received: Fri, 10-Jan-86 23:33:43 EST Organization: Eaton IMS, Westlake Village, CA Lines: 27 Keywords: cron TZ date System V r2v2 cron neglects to set up the TZ variable in the environment. As a result, any forked program that outputs the date defaults to EST5EDT (like cron=>uucp=>uux=>mail). Needless to say, this is a bit confusing for us PST8PDT sites on the west coast. The same problem existed in System V r0, and System V r2v0. The following diffs, however, are accurate only for System Vr2v2. Jim Macropol Eaton IMS {ihnp4,trwrb,scgvaxd,voder,vortex}!wlbr!jm 133a134 > char *getenv(); 137a139 > char tznme[50]="TZ="; 139c141 < homedir,logname,"PATH=:/bin:/usr/bin:/usr/lbin","SHELL=/bin/sh",0}; --- > homedir,logname,"PATH=:/bin:/usr/bin:/usr/lbin","SHELL=/bin/sh",tznme,0}; 157a160 > char *tzn; 172a176,179 > > if ((tzn=getenv("TZ")) == 0) > tzn="EST5EDT"; > strcat(tznme,tzn);