linux date
echo "$(date +'%F %T') nginx down, keepalived will stop"
2022-02-09 15:55:33 nginx down, keepalived will stop
echo "`date "+%F %H:%M:%S"`"
2022-02-10 19:04:47
echo "$(date +'%F %T') nginx down, keepalived will stop"
2022-02-09 15:55:33 nginx down, keepalived will stop
echo "`date "+%F %H:%M:%S"`"
2022-02-10 19:04:47