OCI: How to Configure RSYSLOG to Use UTC Timezone?
Applies to:
Oracle Cloud Infrastructure - Version N/A and later
Linux x86-64
Goal
How to configure RSYSLOG to use UTC timezone? The default rsyslog time zone is the local time zone set on the host.
Solution
Append this parameter “TZ=UTC” in /etc/sysconfig/rsyslog file and restart the rsyslog service.
1) Execute the following command to log the existing rsyslog time zone along with date command.
It shows the Local Machine and rsylog time zone is in IST.
$ sudo logger "Time in local machine time `date`" $ sudo cat /var/log/messages|grep "local machine" Aug 1 11:59:51 test root[795738]: Time in local machine time Tue Aug 1 11:59:51 IST 2023
Tagged:
1