Hi,
I did a man date on my solaris 9 box and it says
FSF Last change: GNU Shell Utilities
It supports the -d option, but I can't find where it is installed on our server.
/usr/bin/date doesn't support it as you pointed out.
Maybe you can find the GNU shell utilities ( which might complement BASH but weren't installed ) and get them installed on your machine.
Here is a csh script to subtact 5 minutes in %H:%M format.
I do it by adding a day - 5 minutes to avoid the if statements with 00:00 - 00:04 becoming 23:55 - 23:59
#! /bin/csh
set h = `date "+%H"`
set m = `date "+%M"`
@ min = ( $h * 60 ) + $m + 1435
@ h = ( $min / 60 ) % 24
@ m = $min % 60
echo "$h $m" | awk '{printf("%2d:%2d\n",$1,$2)'};
I used awk to make sure I could get 2 DIGIT numbers in the display
00:01 instead of 0:1
Someone in my office suggest perl
perl -e '$now = localtime(time-300); printf("%s\n",substr($now,11,5));'
but if you wanted a PERL solution you probably would have asked you question in the PERL forum.