# sync now system time, yes: $3="-u" no: $3 is none. if [[ "$3" == "-u" ]];then Tcmd="/usr/bin/rdate" [ ! -x $Tcmd ] && echo "rdate not install!!" && exit 1 "$Tcmd" -s "$Tip" fi
# Modf if [[ -n "$2" && "$1" == "-" || "$1" == "+" ]];then Func=$1 [[ "$3" == "-s" ]] && Num=$2 || Num=$(($2*60)) Ntime=`date +%s` Ltime=$(($Ntime$Func$Num)) #Date=`/bin/date -d @"$Ltime" 2>/dev/null` #echo $Ltime Res=`date -d "1970-01-01 UTC $Ltime seconds" +%m%d%H%M%Y.%S` date date $Res else echo "First,input + or -;Second,input a number." exit 2 fi