How do I change the time zone on my server?

Browse by products and services

  • Applies to: Grid
    • Difficulty: Easy
    • Time Needed: 10
    • Tools Required: AccountCenter access or SSH / FTP access
  • Applies to: DV
    • Difficulty: Medium
    • Time: 10
    • Tools needed: SSH or Plesk administrator access


Follow these instructions to change the time zone on your Grid.


  1. Sign into the AccountCenter.
  2. Click on your primary domain.
  3. Select the File Manager icon.
  4. Click on the /etc folder.
  5. Click the file called php.ini.sample, it may also be called php.ini if you have edited this file before.
  6. Once the file is open, add the following to any blank line underneath [PHP]:

    Filename: php.ini


    Please note that this would set the timezone to Bermuda (-4 UTC), modify the timezone to whatever you would like it to be. For a list of timezones that PHP supports, visit this PHP website.

  7. If the file is called php.ini.sample, change it to php.ini in the file name text box. If it is already named php.ini, proceed to the next step.


  8. Click the save changes button.

You can verify that the new timezone is set properly by setting up and viewing a PHP Info page on your Grid.


Follow these instructions to change the time zone on your DV.


Plesk method

Control Panel

To adjust the system date and time settings:

  1. Log into the Plesk Control Panel for your domain.

  2. Click on the Server tab.

  3. Under General Settings, click on System Time.
  4. Change the time and date settings as desired, and select your time zone.


    You will need to restart your server for the time zone change to take effect.

  5. Click on the Server tab to return to the Tools & Settings page. Under Server Management, click on Restart Server.

Server Administration Panel

You must have the Server Administration Panel enabled. For instructions, please see: How can I change my Plesk interface?

  1. Log into your Server Administration Panel.

    Plesk 11 Server Administration Panel

  2. From the left navigation menu, under Server Management, click on Tools & Settings.
  3. In the General Settings section, click on System Time.
  4. On this screen, change the time and date settings as desired, and select your time zone.
  5. Click the OK button to save your settings.

This will update your server's time zone. You do not need to restart Plesk or your server as a whole. However, if you want your databases to reflect the change, you will need to restart MySQL. See Restart Plesk services for details.


Remember that all timestamps, including existing ones, will now reflect the new time zone.

Command line method

You cannot change the system time on a DV because all the virtualized servers on the actual physical server can have only one system time. However, it is possible to change the default system timezone for your DV with the tzselect command.

You will be prompted to select several time zone options. This example will select Pacific Time.

Please identify a location so that time zone rules can be set correctly.
  Please select a continent or ocean.
   1) Africa
   2) Americas
   3) Antarctica
   4) Arctic Ocean
   5) Asia
   6) Atlantic Ocean
   7) Australia
   8) Europe
   9) Indian Ocean
  10) Pacific Ocean
  11) none - I want to specify the time zone using the Posix TZ format.

Enter your desired region:


  Please select a country.
   1) Anguilla		     27) Honduras
   2) Antigua & Barbuda	     28) Jamaica
   3) Argentina		     29) Martinique
   4) Aruba		     30) Mexico
   5) Bahamas		     31) Montserrat
   6) Barbados		     32) Netherlands Antilles
   7) Belize		     33) Nicaragua
   8) Bolivia		     34) Panama
   9) Brazil		     35) Paraguay
  10) Canada		     36) Peru
  11) Cayman Islands	     37) Puerto Rico
  12) Chile		     38) St Barthelemy
  13) Colombia		     39) St Kitts & Nevis
  14) Costa Rica		     40) St Lucia
  15) Cuba		     41) St Martin (French part)
  16) Dominica		     42) St Pierre & Miquelon
  17) Dominican Republic	     43) St Vincent
  18) Ecuador		     44) Suriname
  19) El Salvador		     45) Trinidad & Tobago
  20) French Guiana	     46) Turks & Caicos Is
  21) Greenland		     47) United States
  22) Grenada		     48) Uruguay
  23) Guadeloupe		     49) Venezuela
  24) Guatemala		     50) Virgin Islands (UK)
  25) Guyana		     51) Virgin Islands (US)
  26) Haiti

Select a country:


  Please select one of the following time zone regions.
   1) Eastern Time
   2) Eastern Time - Michigan - most locations
   3) Eastern Time - Kentucky - Louisville area
   4) Eastern Time - Kentucky - Wayne County
   5) Eastern Time - Indiana - most locations
   6) Eastern Time - Indiana - Daviess, Dubois, Knox & Martin Counties
   7) Eastern Time - Indiana - Starke County
   8) Eastern Time - Indiana - Pulaski County
   9) Eastern Time - Indiana - Crawford County
  10) Eastern Time - Indiana - Switzerland County
  11) Central Time
  12) Central Time - Indiana - Perry County
  13) Central Time - Indiana - Pike County
  14) Central Time - Michigan - Dickinson, Gogebic, Iron & Menominee Counties
  15) Central Time - North Dakota - Oliver County
  16) Central Time - North Dakota - Morton County (except Mandan area)
  17) Mountain Time
  18) Mountain Time - south Idaho & east Oregon
  19) Mountain Time - Navajo
  20) Mountain Standard Time - Arizona
  21) Pacific Time
  22) Alaska Time
  23) Alaska Time - Alaska panhandle
  24) Alaska Time - Alaska panhandle neck
  25) Alaska Time - west Alaska
  26) Aleutian Islands
  27) Hawaii

Select a time zone:


  The following information has been given:

  	United States
  	Pacific Time

  Therefore TZ='America/Los_Angeles' will be used.
  Local time is now:	Fri Feb 27 10:08:21 PST 2009.
  Universal Time is now:	Fri Feb 27 18:08:21 UTC 2009.
  Is the above information OK
  1) Yes
  2) No

Confirm your choice:


  You can make this change permanent for yourself by appending the line
  	TZ='America/Los_Angeles'; export TZ
  to the file '.profile' in your home directory; then log out and log in again.

  Here is that TZ value again, this time on standard output so that you
  can use the /usr/bin/tzselect command in shell scripts:
  1. Log into your server as root or a sudo user via SSH.
  2. Run the following command to bring up your time zone options:
  3. View the results. In this example, it is America/Los_Angeles.
  4. Back up your current localtime file:
    mv /etc/localtime /etc/localtime.orig
  5. Make a symbolic link from /etc/localtime to America/Los_Angeles (be sure to use your own time zone result from Step 3 above):
    ln -sf /usr/share/zoneinfo/America/Los_Angeles /etc/localtime
  6. Test that the change was successful by running the date command:

    You should see results for your new time zone:

    Tue Feb 21 11:23:27 PST 2012