Linux

How to change the system time zone under RedHat and CentOS

Scenario: 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:

Another way to achieve this is by running the syntax below

hwclock --show

To list available timezones, run the command below

timedatectl list-timezones

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

On how to change timezone in Ubuntu, see the following link https://linuxize.com/post/how-to-set-or-change-timezone-on-ubuntu-18-04/

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