Systems File for 3b2

rjd at occrsh.ATT.COM rjd at occrsh.ATT.COM
Thu Apr 21 00:48:00 AEST 1988


:This common problem is cause by cron not knowing how to export the
:proper TZ (timezone) environment variable; the default EST5EDT gets
:used.  This can be fixed three ways:
:
:	(1) move to New Jersey
:	(2) get SVR3 -- it handles TZ correctly
:	(3) put ". /etc/TIMEZONE" everywhere.
:
:Option (3) means you need to add the above line to the beginning
:of /usr/lib/uucp/uudemon.poll and /usr/lib/uudemon.hour if you are
:using the standard Poll scheme, or at the top of your shell scripts.
:There are other solutions to the incoming-mail-has-the-wrong-time
:problem, but that is for another day.
:
:MORAL: Always include ". /etc/TIMEZONE" at the start of scripts
:       run from cron.
:-- 
:Steve Friedl   V-Systems, Inc.  Wizard of undocumented 3B options

  Well, it is much easier to have the script that starts cron on boot
up to have the correct TZ variable.  Just add ". /etc/TIMEZONE" before
the /etc/cron line in whichever file starts cron for you; usually either
/etc/rc.d/cron or /etc/rc2.d/S??cron.  In this way, cron WILL have the
correct TZ variable.  Alternately, just put the ". /etc/TIMEZONE" on the
first line in /etc/rc2 (for multi user run control).
  You see, its not a problem of cron not properly exporting the TZ variable,
its a problem of cron NEVER being told what the right TZ variable is, so
it assumes EST5EDT....

  Incoming mail never having the right time is related to this in that
/etc/TIMEZONE is never consulted here either (because uucico as a shell
does not execute /etc/profile, normally the only place that /etc/TIMEZONE
is consulted).

Randy



More information about the Comp.sys.att mailing list