How to Change Time Zones on Servers

Optimizing and customizing your VPS/Dedicated server

How to Change Time Zones on Servers

Postby Mark » Wed Dec 23, 2009 8:49 am

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
Mark
 
Posts: 124
Joined: Fri Dec 11, 2009 2:18 pm

Return to Configuring VPS/Dedicated servers

Who is online

Users browsing this forum: No registered users and 1 guest

cron