How To Change Timezone in CentOS 7 / RHEL 7 & Fedora 31/30/29

0
Change Timezone in CentOS 7
Change Timezone in CentOS 7

Changing timezone in CentOS 7 / RHEL 7 and Fedora is a straightforward task. The timedatectl command makes it easier for us to change the timezone in CentOS 7 / RHEL 7.

For this demo, we will change the system time zone from EST to IST.

Change Timezone

Now, first, let’s check the date with the date command.

date

Output:

Mon Dec  2 23:14:51 EST 2019

As per the above output, the system has been configured with the Eastern Standard Time (EST) time zone.

Use the following command to list all the available time zones.

timedatectl list-timezones

Output:

Africa/Abidjan
Africa/Accra
Africa/Addis_Ababa
Africa/Algiers
Africa/Asmara
.     .     .
.     .     .
Pacific/Pohnpei
Pacific/Port_Moresby
Pacific/Rarotonga
Pacific/Saipan
Pacific/Tahiti
Pacific/Tarawa
Pacific/Tongatapu
Pacific/Wake
Pacific/Wallis
UTC

You can filter the output with the city nearer to you or the continent.

timedatectl list-timezones | grep -i kolkata

OR

timedatectl list-timezones | grep -i Asia

Output (For City):

Asia/Kolkata

Set the timezone using the following command.

timedatectl set-timezone Asia/Kolkata

Verify Timezone

Verify the new timezone using the date command.

date

Output:

Tue Dec  3 09:47:13 IST 2019

You can see that the system is now in Indian Standard Time (IST) Timezone.

Conclusion

That’s All. I hope you were able to change the timezone in CentOS 7 / RHEL 7 & Fedora systems without any issues.

You might also like