#bash's printf formats a date itself: %(format)T, -1 is now
printf -v now '%(%Y-%m-%d %H:%M:%S)T' -1
#now is the current date in the local time zone
#seconds since 1970-01-01 00:00:00 UTC (bash 5.0 and newer)
seconds=$EPOCHSECONDS
#date prints the current date, -u in time zone UTC
utcDate=$(date -u '+%Y-%m-%d %H:%M:%S')
#utcDate is the current date in time zone UTC
#the variable TZ sets the time zone for one command
tokyoDate=$(TZ=Asia/Tokyo date '+%Y-%m-%d %H:%M:%S %z')
#tokyoDate is the current date in time zone UTC +9:00
echo "now is $now"
echo "seconds is $seconds"
echo "utcDate is $utcDate"
echo "tokyoDate is $tokyoDate"