Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!utgpu!water!watnot!watmath!clyde!rutgers!cbmvax!bpa!asi!metro From: metro@asi.UUCP Newsgroups: comp.unix.questions Subject: Re: Daylight Savings Time and my 3b2 Message-ID: <102@asi.UUCP> Date: Fri, 10-Apr-87 18:30:10 EST Article-I.D.: asi.102 Posted: Fri Apr 10 18:30:10 1987 Date-Received: Sun, 12-Apr-87 03:24:45 EST References: <6807@brl-adm.ARPA> Organization: Assessment Systems, Inc., Philadelphia, PA Lines: 26 Summary: you have to invoke /etc/TIMEZONE In article <6807@brl-adm.ARPA>, well!lamc!kdavis@lll-crg.arpa writes: > I have a different 3b2 timezone problem. When a crontab is run it > reverts to EST time even though the clock is set for PST. TZ is > passed correctly through /etc/password and when logging in as root, > etc. the date command is correct but when running crontabs it is 3 > hours off. Anybody tell me what gives? > > ----- > Ken Davis, W6RFN Yes, on the cron line in which you want to use the date command, you must preceed it with a call to /etc/TIMEZONE. Since /etc/TIMEZONE sets the environment parameter TZ, you have to invoke it with the shell "." command. Example: 59 23 * * * pc=\%; . /etc/TIMEZONE;/bin/cp /etc/wtmp `/bin/date "+/usr/adm/wtmp/wtmp.${pc}y${pc}m${pc}d"`; /bin/cat /dev/null >/etc/wtmp Is our entry for root which rolls out one days worth of /etc/wtmp data to a file named "/usr/adm/wtmp/yymmdd" where yymmdd is 870401 for April 1, 1987. -- Metro T. Sauper, Jr. Assessment Systems, Inc. Director, Remote Systems Development 210 South Fourth Street (215) 592-8900 ..!asi!metro Philadelphia, PA 19106