🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: net.bugs.usg
Article #248

System V cron problem (with fix)

#248
From: James Macropol
Date: Wed, 08 Jan 1986 21:05
27 lines
1389 bytes
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);
Technical Details
Message-ID: <405@wlbr.UUCP>
Path: arc1-ca.pugleaf.net!utzoo!watmath!clyde!burl!ulysses!allegra!mit-eddie!genrad!decvax!decwrl!nsc!voder!wlbr!jm

Show Full Headers
Complete Article Headers
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: arc1-ca.pugleaf.net!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