System V cron problem (with fix)

James Macropol jm at wlbr.UUCP
Thu Jan 9 07:05:51 AEST 1986


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);



More information about the Net.bugs.usg mailing list