Xref: utzoo comp.sys.att:6101 unix-pc.general:2663 Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!uflorida!haven!uvaarpa!virginia!scl From: scl@virginia.acc.virginia.edu (Steve Losen) Newsgroups: comp.sys.att,unix-pc.general Subject: Re: Daylight Savings Time Keywords: TZ EDT Message-ID: <2284@virginia.acc.virginia.edu> Date: 13 Apr 89 20:33:35 GMT References: <10671@stb.UUCP> <652@icus.islp.ny.us> <143@dftsrv.gsfc.nasa.gov> <1567@lznv.ATT.COM> <1989Apr4.175630.18101@tmsoft.uucp> <6514@cbmvax.UUCP> Reply-To: scl@virginia.acc.Virginia.EDU (Steve Losen) Organization: University of Va., Charlottesville, VA Lines: 37 Here is a little script that we run every night with cron just to make sure the timezone file /etc/TIMEZONE is correct. It puts the kluge in the TIMEZONE file if the current day lies between the first and last Sunday in April. We run it every night because we have a lot of machines and we don't trust them all to be up on the two critical Sundays. set `date` file=/etc/TIMEZONE line="TZ=EST5EDT; export TZ" day=$1 month=$2 num=$3 if [ "$month" = "Apr" ] ;then case $day in Sun) lower=0; upper=24;; Mon) lower=1; upper=25;; Tue) lower=2; upper=26;; Wed) lower=3; upper=27;; Thu) lower=4; upper=28;; Fri) lower=5; upper=29;; Sat) lower=6; upper=30;; esac if [ $num -gt $lower -a $num -lt $upper ] ;then line="TZ=EDT4; export TZ" fi fi echo "$line" > $file -- Steve Losen scl@virginia.edu University of Virginia Academic Computing Center