[SunHELP] Solaris10 date calculation not working?
sd_price at yahoo.com
Sun Oct 11 21:08:07 CDT 2009
I'm trying to do a simple "what date is yesterday" shell script variable - without having to go to perl or something else.
# todays date & time
#yesterdays date & time - should be 24 hours back
yesterday1=`TZ=US/Central+24 date +%Y%m%d%H%M`
yesterday2=`TZ=CST6CDT+24 date +%Y%m%d%H%M`
yesterday3=`TZ=America/Chicago+24 date +%Y%m%d%H%M`
Why is it only 19 hours back instead of the 24 hours ?
I tried ksh & sh & bash - just in case korn wasn't handling correctly - but still got the same output.
I'm sure I'm missing something simple -
Any suggestions welcome ...
More information about the SunHELP