media-2001.communication & .networks ® SPRL - Belgique France Luxembourg

Setting your Virtual Private Server 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 on your Virtual Private Server by connecting to your server via SSH or Telnet and following the instructions below.

  • FreeBSD

    1. Select the Timezone you want to use from the /usr/share/zoneinfo/ directory:

      % cd /usr/share/zoneinfo
      % ls
    2. p>Copy the time zone file onto your Virtual Private Server. This example uses the America/Los_Angeles timezone:

      % cp /usr/share/zoneinfo/America/Los_Angeles ~/etc/localtime
    3. Create the following directory on your virtual server and copy the appropriate file:

      %mkdir ~/usr/share/zoneinfo
      % mkdir ~/usr/share/zoneinfo/America
      % cp /usr/share/zoneinfo/America/Los_Angeles ~/usr/share/zoneinfo/America/
    4. 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
    5. To configure cron to use the same timezone, add the following line to the beginning of your cronfile:

      TZ=America/Los_Angeles
    6. Finally, restart apache so that it will use your new timezone for it's log files.

  • Solaris

    1. Select the Timezone you want to use from the /usr/share/lib/zoneinfo/ directory:

      % cd /usr/share/lib/zoneinfo
      % ls
    2. Copy the /etc/default/init file onto your Solaris Virtual Private Server.

      % mkdir ~/etc/default
      % cp /etc/default/init ~/etc/default
      % chmod 755 ~/etc/default/init
    3. 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
    4. Copy the /usr/share/lib/zoneinfo/US/Pacific file onto your Solaris Virtual Private Server.

      % mkdir ~/usr/share/lib/zoneinfo/US
      % cp /usr/share/lib/zoneinfo/US/Pacific ~/usr/share/lib/zoneinfo/US/
    5. Add the following new line to the ~/.cshrc file.

      setenv TZ US/Pacific

      After editing the ~/.cshrc file, be sure to run:

      % source ~/.cshrc
    6. To configure cron to use the same timezone, add the following line to the beginning of your cronfile:

      TZ=US/Pacific
    7. Finally, restart apache so that it will use your new timezone for it's log files.

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.

NOTE: Be sure to Restart Your Web Server so that it will use the new time you have set.


Chercher sur le site
Support clients
ID :
PW:

[Passe perdu][Nouveau]
Hebergement sur serveur apache PHP Revendeur officiel NTT VERIO (Groupe NTT docomo) Pour recevoir nos infos,
laissez-nous votre e-mail
Michel FREMY media-2001 .communication & .networks ® SPRL - 649 Chaussée de Nivelles 6230 Buzet Belgique - Copyright et Mentions légales