Change Timezone in Linux

linux

Setting the correct timezone is very important in any system to avoid confusions. Especially in systems used by multiple users, one may think the time is wrong without noticing the timezone.

 

To verify the date and time, including the timezone set in a linux (CentOS) host, the below is a very useful command:

#] date

Tue May 17 10:26:49 EDT 2016

Now the question is how did the  system pick EDT? This get configured during the time of installing the OS.

The following steps can be used to reset the timezone to IST.

#] mv localtime /root/

#] ln -s /usr/share/zoneinfo/Asia/Kolkata localtime

Now let us verify of the change happened.

#] date

Tue May 17 10:34:07 IST 2016