Posted by: Mangesh_Linux_Administrator | November 25, 2010

Time zone (how to change)


How to Change Time Zones on Servers

If you want to change the existing time zone of your server. Then follow the steps Below.
Note:: One must have a root user privileges for this.

On Linux Server::

1. Login as a Root.
2. The time zones are located on server in the directory /usr/share/zoneinfo, so change the directory to that one.
Code:

root@Server [~]# cd /usr/share/zoneinfo

3. Copy or move the current local time zone so that you will be able to set the time zone as per requirement.
Code:

root@Server [~]#cp -p /etc/localtime  /etc/localtime-back
Or
root@Server [~]#mv /etc/localtime  /etc/localtime-back

4. Now say for example, if you want to set the BST [British Summer Time] time zone for your server then, you will need to create a symbolic link for the same. The command is as follows.
Code:

root@Server [~]#ln -s /usr/share/zoneinfo/BST  /etc/localtime

Verify the changes done by “date” command.

Code:

root@Server [~]#date
Mon Oct 20 04:51:57 BST 2008

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 )

Google+ photo

You are commenting using your Google+ 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 )

w

Connecting to %s

Categories

%d bloggers like this: