Xref: utzoo news.software.b:1235 comp.mail.uucp:1149 Path: utzoo!mnetor!uunet!husc6!mailrus!nrl-cmf!ames!oliveb!pyramid!voder!tolerant!kennedy From: kennedy@tolerant.UUCP (Bill Kennedy) Newsgroups: news.software.b,comp.mail.uucp Subject: Re: Timezone trouble in inews, smail... Message-ID: <1439@tolerant.UUCP> Date: 22 Mar 88 17:04:13 GMT References: <175@octopus.UUCP> Reply-To: kennedy@tolerant.UUCP (Bill Kennedy) Followup-To: bill@ssbn.WLK.COM (Bill Kennedy) Distribution: na Organization: Tolerant Systems Inc., San Jose Lines: 44 Keywords: Gotta use tzset more Summary: How to avoid EST In article <175@octopus.UUCP> pete@octopus.UUCP (Pete Holzmann) writes: >As a non-source-licensed uucp site, we've had to live with the sad fact that >our particular Unix is configured with a default east coast timezone. That's [ discussion and symptoms of the problem deleted ] The problem lies in the default environment that is inherited by cron and his friends. There are several ways around it. For cron you can make sure that he gets an environment with TZ set correctly before it starts from /etc/rcxxx or restarts (my system kills and restarts cron daily as part of clean up). That doesn't help you with uucico or others that don't necessarily have an environment where TZ is guaranteed. To solve those you can write a dirt simple little program that puts the appropriate TZ stuff in a string variable and execve to the original binary that didn't have one. The same could be done with a script. We renamed the "real" uucico to uucico.exec and the front end program uucico. All it did was get TZ right and pass it to uucico.exec. There's probably a more elegant way to do it but I know that either of these will work. > - I don't find any calls to tzset in the news software. Yet sometimes > inews gets the time zone right in the log file. So clearly > I don't have the whole picture. Maybe somebody with source can > grep for a better answer. Any program who has an appropriate environment will get it right. If you are in doubt about who does and doesn't you can schedule them out of at or cron and send the date output to a log file and see if it comes up with EST (no environment) or PST (desired environment) and adjust accordingly. > - Where else do I need to set up the correct time zone? I have it in > /.profile (set TZ...), and in /etc/timezone. (This is V.2 > with some Berkeleyisms added). The /etc/profile is only valid for user logins that execute a shell. The uucp logins go through uucico (default environment) and depending on how you are doing news, you are getting uuxqt's environment or cron's. I can send you some code fragments to make it what you want but I think you can see where I am going. I would *not* recommend that you use a script to get to uucico, a binary is easier to control. The opinions are my own, Tolerant is nice enough to let me use their equipment so don't blame me on them. Bill Kennedy {rutgers,cbosgd,ihnp4!petro}!ssbn!bill or bill@ssbn.WLK.COM