I wrote this little script that is supposed to return the date 7 days ago from the current date and time but for some reason, it ignores the timezone and only returns the time in GMT... what am I doing wrong???
lastweek=`TZ=$timezone+168 date +"%Y-%m-%d-%H.%M.%S"`
echo Last Week: $lastweek
output looks like this:
Last Week: 2004-09-27-13.02.25
(The time should be 9:02 a.m.)