Linux

How to change the system time zone under RedHat and CentOS

How to change the system time zone under RedHat and CentOS

The system time zone setting is used for managing time-related information, such as displaying the correct time and date on your computer, scheduling tasks, and handling time-related data. Changing the time zone can affect various system functions and can lead to synchronization and scheduling issues. See related guides: Enable or disable Linux System’s Clock Sync with NTP Server and Kerberos error: Clock skew too great while getting initial credentials.

This guide will provide you with details on how to change the system time zone under RedHat and CentOS.

When you have some servers in your enterprise environment running in different timezones. It is vital to have your servers (Master and Slaves) running in the same time zone. This helps in having an accurate timestamp of events.

The command timedatectl prints extensive information about the timezone as shown below:

timezone information

Another way to achieve this is by running the syntax below

hwclock --show
run the syntax hwclock --show

To list available timezones, run the command below

timedatectl list-timezones
list of timezones

Please see AWS Network Adapter: Redhat to Citrix PV and AWS PV Driver, Domain Name System: How to create a DNS record, how to Install and configure Ansible on Azure Virtual Machine, and the Different ways to check for Ansible syntax errors

Steps to change the system time zone

The time zone can be changed by executing the following command below

sudo timedatectl set-timezone <timezone>

Next, Restart the Server with the command below

shutdown -r

Also, see Enable or disable Linux System’s Clock Sync with NTP Server, and DNS Server: Setting Up a Third-Party on a Linux Server.

FAQs relating to system time zone

Do I Need to Restart the System After Changing the Time Zone?

In most cases, you don’t need to reboot the system. The time zone change takes effect immediately after you run the timedatectl command to set the new time zone as described above. You can verify the change by running timedatectl or checking the system clock.

How Can I List Available Time Zones?

You can use the timedatectl command with the list-timezones option to display a list of available time zones. You can then select the desired time zone from the list.

On how to change the timezone in Ubuntu. That’s all for changing the system time zone under RedHat and CentOS. I hope you found this blog post helpful. Please leave a question or comment down below.

Subscribe
Notify of
guest

0 Comments
Inline Feedbacks
View all comments
0
Would love your thoughts, please comment.x
()
x