|
| |

|
|
| |
| |
Changing the Timezone
The default timezone on your
server is set to be the same as the System Time. System time is the timezone
that the operating system uses, in this case, GMT. You can change the timezone
your server uses to be different from System Time by following these
instructions, according to your server O/S:
-
FreeBSD
Connect to your server via Telnet
or SSH and complete these steps.
-
Select the Timezone you want to use from the /usr/share/zoneinfo/ directory:
% cd /usr/share/zoneinfo
% ls
-
Copy the time zone file onto your VPS. This example uses the America/Los_Angeles
timezone:
% chmod 600 ~/etc/localtime
% cp /usr/share/zoneinfo/America/Los_Angeles ~/etc/localtime
-
Create the following directory on your virtual server and copy the appropriate file:
% mkdir ~/usr/share/zoneinfo/America
% cp /usr/share/zoneinfo/America/Los_Angeles ~/usr/share/zoneinfo/America/
-
Add the following new line to the ~/.cshrc file.
setenv TZ America/Los_Angeles
After editing the ~/.cshrc file, be sure to run:
% source ~/.cshrc
-
To configure cron
to use the same timezone, add the following line to the
beginning of your cronfile:
TZ=America/Los_Angeles
-
Solaris
Connect to your VPS via Telnet
or SSH and complete these steps.
-
Select the Timezone you want to use from the /usr/share/lib/zoneinfo/ directory:
% cd /usr/share/lib/zoneinfo
% ls
-
Copy the /etc/default/init file onto your Solaris VPS.
% mkdir ~/etc/default
% cp /etc/default/init ~/etc/default
-
Edit the TZ line in the new ~/etc/default/init file
to use the timezone you want. This example uses the
US/Pacific timezone:
TZ=US/Pacific
-
Copy the /usr/share/lib/zoneinfo/US/Pacific file onto your Solaris VPS.
% mkdir ~/usr/share/lib/zoneinfo/US
% cp /usr/share/lib/zoneinfo/US/Pacific ~/usr/share/lib/zoneinfo/US/
-
Add the following new line to the ~/.cshrc file.
setenv TZ US/Pacific
After editing the ~/.cshrc file, be sure to run:
% source ~/.cshrc
-
To configure cron
to use the same timezone, add the following line to the
beginning of your cronfile:
TZ=US/Pacific
-
BSD/OS Upgrade!
Connect to your VPS via Telnet
or SSH and issue these commands:
% chmod 600 ~/etc/localtime
% cp /usr/share/zoneinfo/posix/US/Pacific ~/etc/localtime
To change to the current time in some other time zone, substitute
any time zone available in the following directory for
US/Pacific above.
/usr/share/zoneinfo/posix
-
Huh?
If you don't know the VPS O/S, try the following:
Did It Work?
To make sure you set the time zone correctly, do the following:
% date
% virtual date
These should both show the timezone you set your server to use.
|
|
|
|
|