Linux, Windows, Virtualization, OpenSource & Blogging

How to Change Timezone in CentOS 7 / RHEL 7 / Fedora 26/25

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 EDT to IST.

Change Timezone

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

date

Output:

Sun Oct 22 10:46:44 EDT 2017

As per the above command, my system has been configured with Eastern Daylight Time time zone.

Use the following command to list all 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 using grep.

timedatectl list-timezones | grep -i kolkata

Output:

Asia/Kolkata

Set the timezone using the following command.

timedatectl set-timezone Asia/Kolkata

Verify the new timezone using “date” command.

date

Output:

Sun Oct 22 20:18:31 IST 2017

That’s All.

POSTS YOU MAY LIKE -:)

You might also like

How to Change Timezone in CentOS 7 / RHEL 7 / Fedora 26/25

0