"yesterdate" function?

Paul S. Sawyer pss at unh.UUCP
Sat Jan 7 07:22:29 AEST 1989


In article <1033 at jpusa1.UUCP>, stu at jpusa1.UUCP (Stu Heiss) writes:
> 
> add 24 to your tz offset (example 6 for cdt; 6+24=30) and do
> 	$ TZ=30 date +%y%m%d
> Stu Heiss {gargoyle.uchicago.edu,uunet.uu.net,spl1,ddsw1}!jpusa1.uucp!stu

On SysV.2, anyway, you need:

 	$ TZ=CST30 date +%y%m%d
or
 	$ TZ=CST30CDT date +%y%m%d	# covering daylight savings periods

(Which is probably what you meant anyway  B-)
Is there ANY (reasonable) function that CAN'T be (reasonably) implemented in
/bin/sh (programming) "without writing a [insert language here] program"?

-- 
= = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =
Paul S. Sawyer              uunet!unh!unhtel!paul     paul at unhtel.UUCP
UNH Telecommunications
Durham, NH  03824-3523      VOX: 603-862-3262         FAX: 603-862-2030



More information about the Comp.unix.questions mailing list