the syntax -how to output recent date and time to log file of the date command is like this:

#!/bin/bash

echo "firewall started on: "$(date '+%Y-%m-%d-%H:%M:%S')" >> /var/log/firewall.log
admin