Powered by Invision Power Board


  Closed TopicStart new topicStart Poll

> I want to change the time zone used by my VPS
andy
Posted: Feb 22 2004, 12:43 AM
Quote Post





Group: Advantagecom Staff
Posts: 4,340
Member No.: 9
Joined: 12-July 02



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

CODE
cd /etc
rm -f localtime
ln -s /usr/share/zoneinfo/America/Vancouver /etc/localtime
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:

CODE
# 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.


--------------------
Sincerely,
Andrew Kinney
CTO, Advantagecom Networks

Please do not private message me. My regular management duties preclude responding to every customer that sends me a support issue. Instead, post on the forum or contact tech support.
PMUsers Website
Top
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

Topic Options Closed TopicStart new topicStart Poll