Changing the Time on a Virtual Private Server
You can change the current date and time on your Virtual Server to your
own local time, or the current time in any other time zone that you want
to use. For example, to change the current time on your Virtual Server to
the current time in the USA Pacific Standard Time zone, do the following
according to your Virtual Server O/S:
- FreeBSD
Connect to your Virtual Server via Telnet or SSH
and complete these steps.
- Copy the time zone file onto your Virtual Server.
% chmod 600 ~/etc/localtime
% cp /usr/share/zoneinfo/America/New_York ~/etc/localtime
- Add the following new line to the ~/.cshrc file.
setenv TZ America/New_York
To change to the current time in some other time zone, substitute any time zone available in the following
directory for America/Los_Angeles above.
/usr/share/zoneinfo
- Solaris
Connect to your Virtual Server via Telnet or SSH
and complete these steps.
- Copy the /etc/default/init file onto your Solaris Virtual Private Server.
% mkdir ~/etc/default
% cp /etc/default/init ~/etc/default
- Edit the TZ line in the new ~/etc/default/init file to read like this:
TZ=US/Pacific
- Copy the /usr/share/lib/zoneinfo/US/Pacific file onto your
Solaris Virtual Server.
% 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
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/lib/zoneinfo
Did It Work?
To make sure you set the time zone correctly, do the following:
% virtual date
NOTE: Be sure to
Restart Your Web Server so that
it will use the new time you have set.
|
|