Follow these instructions to change the time zone on your Grid.
- Sign into the AccountCenter.
- Click on your primary domain.
- Select the File Manager icon.
- Click on the /etc folder.
- Click the file called php.ini.sample, it may also be called php.ini if you have edited this file before.
- Once the file is open, add the following to any blank line underneath [PHP]:
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.
- 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.
- 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.
To adjust the system date and time settings:
- Log into the Plesk Control Panel for your domain.
- Click on the Tools & Settings tab.
- Under General Settings, click on System Time.
- 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.
- 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?
- Log into your Server Administration Panel.
- From the left navigation menu, under Server Management, click on Tools & Settings.
- In the General Settings section, click on System Time.
- On this screen, change the time and date settings as desired, and select your time zone.
- 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: America/Los_Angeles
- Log into your server as root or a sudo user via SSH.
- Run the following command to bring up your time zone options:
- View the results. In this example, it is America/Los_Angeles.
- Back up your current localtime file:
mv /etc/localtime /etc/localtime.orig
- 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
- 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