KnowledgeBase Glossary    Contact Us
Browse by Category KnowledgeBase .: Virtuozzo and OpenVz Based Accounts .: How can I change the time zone used by my VPS?

How can I change the time zone used by my VPS?

From an SSH command prompt within your VE, run the following commands while logged in as root:

  1. cd /etc
  2. rm -f localtime
  3. ln -s /usr/share/zoneinfo/America/Vancouver /etc/localtime
  4. date

In this example, we set the local time for the VE to Vancouver, WA, USA or Pacific Standard Time. The 'date' command shows the current time with the new timezone applied.

If you want a different time zone, simply change the first argument to the 'ln -s' command to be the correct path for the region or time zone file you wish to use. Various time zones can be found in /usr/share/zoneinfo/ or in subdirectories of that directory.

Just be sure to use the path to an actual normal file and not a directory. To see if what you want to use is a file or directory, use the 'ls -lad' command. For instance:

# ls -lad /usr/share/zoneinfo/America/
drwxr-xr-x    5 root     root         3072 Dec 15 16:25 /usr/share/zoneinfo/America/

# ls -lad /usr/share/zoneinfo/America/Vancouver
-rw-r--r--    2 root     root         1020 Mar  5  2003 /usr/share/zoneinfo/America/Vancouver

If the first letter in the output is a "d" then the item you are examining is a directory. If the first character is a "-" then the item you are examining is a normal file.

How helpful was this article to you?

Related Articles

article How can I tell which features PHP is compiled with?
Create a file on in your web document space...

(No rating)  7-18-2005    Views: 6793   
article How can I change my site's IP address?
Follow these steps to move a site to a...

  3-28-2006    Views: 19554   
article Why can't I change my FrontPage username?
All sites on our Cobalt RaQ4 servers must use...

(No rating)  11-22-2005    Views: 6800   

User Comments

No comments have been posted.

.: Powered by Lore 1.5.4
Copyright 2005-2014 Advantagecom Networks, Inc. - Xen Linux Virtual Private Servers (VPS) - Paypal Accepted