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\"`
This work on my Ubuntu 16.04 date: date --date="@$(($(date +%s) - 3600))" "+%m/%d/%Y -%H:%M:%S" And the date version is date (GNU coreutils) 8.25
date
date --date="@$(($(date +%s) - 3600))" "+%m/%d/%Y -%H:%M:%S"
date (GNU coreutils) 8.25