How to change the timezone on CentOS 8

It’s quite easy to change the timezone of CentOS 8, because there is only one instruction you have to operate is datetimectl.

Step 1

Check the current settings of your system including the datetime and the timezone.
The important part of this operation, the timezone file, which is a soft link and connected with the zoneinfo file in the path  located at “/usr/share/zoneinfo/”.
As you can see the highlighted line 4 in the script block below.

 

Step 2

How to identify the timezone name?

We can use this timezone list of Wikipedia.
And search this page using the city name or country name that you preferred. Then you should copy the value in the column named “TZ database name” in the search results.

For example, I want to set the timezone as Taipei. After searching, I should copy this term of “Asia/Taipei”.

And then execute the instruction below.

Please, remember replacing the “Asia/Taipei” with your timezone.

 

Step 3

Varify your changes.

Just run date. It should return the correct date and time on the console.

 

Andy Wang

Non-stop learning and facing challenges.

One thought on “How to change the timezone on CentOS 8

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.