Thank you for supporting the Cloud Customer Connect Community in 2024. It's a gift to work with you!

Look back
You're almost there! Please answer a few more questions for access to the Applications content. Complete registration
Interested in joining? Complete your registration by providing Areas of Interest here. Register

OCI: How to Configure RSYSLOG to Use UTC Timezone?

in Linux 2 comments

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  

Howdy, Stranger!

Log In

To view full details, sign in.

Register

Don't have an account? Click here to get started!