HOW TO CHANGE TIMEZONES IN CENTOS

Check your current timezone using the following command,
date

Time zone files are located at /usr/share/zoneinfo. Navigate to this location and select the timezone file of your choice.
cd /usr/share/zoneinfo

timezone1

The currently active timezone will be stored in /etc/localtime, make a backup of this file,
sudo mv /etc/localtime /etc/localtime.bak

We can create a link,
sudo ln -s /usr/share/zoneinfo/Asia/Kolkata /etc/localtime

Now check the newly updated timezone
datetimezone2

Note: You can change the timezones according to your physical location from the zoneinfo

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s