I’m using the following command in an attempt to work out the time 15 minutes before the timestamp:
/opt/bin/date –date “-15 minutes 2016-04-28T16:58:55” ‘+%Y-%m-%dT%H:%I:%S’
The problem is the time produced is:
2016-04-28T10:10:55
Which is obviously much earlier than 15 minutes before the stated time.
Does anyone have any ideas why this would be?
Not sure this is relevent, but just so you know,
I have to use /opt/bin/date
rather than simply date
because if I write the command like so:
date --date '-15 minutes 2016-04-27T14:14:47'
I get the error
date: invalid date '-15 minutes 2016-04-27T14:14:47'
PS i’m working with Linux on a synology box- Linux version 3.2.40. gcc version 4.6.4