I have the following in a shell script. How can I subtract one hour while retaining the formatting?
DATE=`date "+%m/%d/%Y -%H:%M:%S"`
The following command works on recent versions of GNU date:
date
date -d '1 hour ago' "+%m/%d/%Y -%H:%M:%S"
2.1m questions
2.1m answers
60 comments
57.0k users