Path: utzoo!mnetor!uunet!lll-winken!lll-lcc!ames!mailrus!tut.cis.ohio-state.edu!osu-cis!att!att-ih!occrsh!occrsh.ATT.COM!rjd From: rjd@occrsh.ATT.COM Newsgroups: comp.sys.att Subject: Re: Systems File for 3b2 Message-ID: <144800028@occrsh.ATT.COM> Date: 20 Apr 88 14:48:00 GMT References: <348@spock.UUCP> Lines: 35 Nf-ID: #R:spock.UUCP:-34800:occrsh.ATT.COM:144800028:000:1583 Nf-From: occrsh.ATT.COM!rjd Apr 20 08:48:00 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