Im in EST, and im using the command
CurrentDate=`TZ="EST+24" date +'%y%m%d'`
to get the yesterday's date.
Does this work perfectly for the boundary conditions of month end or year end(leap year) etc ?
Im in EST, and im using the command
CurrentDate=`TZ="EST+24" date +'%y%m%d'`
to get the yesterday's date.
Does this work perfectly for the boundary conditions of month end or year end(leap year) etc ?
yes it works fine, and i perfer to this
$ date -d '1 day ago'
Mon Feb 28 09:39:56 CST 2011
$ date
Tue Mar 1 09:39:58 CST 2011