AlpineWeb Home
Search: For:   ~ Advanced Search  
  Support Home     Documentation     Knowledgebase     Help Desk     Blog 
Support Home > VPS v1 > Administration > Unix > Sunday, October 12, 2008

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.
    1. Copy the time zone file onto your Virtual Server.
      % chmod 600 ~/etc/localtime
      % cp /usr/share/zoneinfo/America/New_York ~/etc/localtime
    2. 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.
    1. Copy the /etc/default/init file onto your Solaris Virtual Private Server.
      % mkdir ~/etc/default
      % cp /etc/default/init ~/etc/default
    2. Edit the TZ line in the new ~/etc/default/init file to read like this:
      TZ=US/Pacific
    3. 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
    4. 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.



Technical Support
° Getting Started Guide
  FreeBSD
° VPS v1 Help
° VPS v2/3 Help
° MPS v2/3 Help
  DNS
° Domain Name Service
° Domain Registration
   
° Help Desk
° Knowledgebase
° Support Policies
° Disclaimer

° AlpineWeb Home
° Compare Hosting Plans
° Network Topology

° Rates & Fees
° Order Center


  SEE ALSO:
· Server Time vs. Virtual Server Time
· Managing Your Virtual Server Remotely
· Using Telnet and SSH
· Rule the World with 13 UNIX Commands


  Home | Site Map | Customer Backroom Copyright  ©  1997-2008  AlpineWeb Design