From mboxrd@z Thu Jan 1 00:00:00 1970 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: fee84,37d7a16bb2db2c0b X-Google-Attributes: gidfee84,public From: "Mr Mayes" Subject: Re: Date Calculations Date: 1998/10/19 Message-ID: <70g3ro$n8s$1@newsreader1.core.theplanet.net>#1/1 X-Deja-AN: 402906366 References: <6v2mt1$74e$1@nnrp1.dejanews.com> <6vju3c$emk$1@newsflash.concordia.ca> X-MimeOLE: Produced By Microsoft MimeOLE V4.72.3110.3 X-Trace: newsreader1.core.theplanet.net 908825272 23836 62.136.25.110 (19 Oct 1998 19:27:52 GMT) Organization: Customer of Planet Online NNTP-Posting-Date: 19 Oct 1998 19:27:52 GMT Newsgroups: comp.unix.osf.osf1 >>I want to be able to set a variable to the current date minus 7. I'm using >>date +"%d-%b-%y"to return the current date and I want to be able to return >>the same format for 1 week ago. > It should be simple enough using the TZ environment variable. TZ=GMT168 date +"+"%d-%b-%y" ought to do the job. Substitute your favourite time zone for GMT. Cheers Rich