> While on the topic of rsyslogd, I have v8.16.0 and use these two lines in rsyslogd.conf to get datetime YYYY-MM-DD HH:MM:SS formatting:
$template CustomFormat,"%timegenerated:::date-year%-%timegenerated:::date-month%-%timegenerated:::date-day% %timegenerated: ::date-hour%:%timegenerated:::date-minute%:%timegenerated:::date-second% %HOSTNAME% %syslogtag%%msg%\n" $ActionFileDefaultTemplate CustomFormat