How to Change the PHP Timezone for a Hosting Account

For consistency, all of our servers use the UTC time standard (GMT time zone) by default, regardless of their actual geographical location. This affects the PHP timezone, among others.

This easy tutorial shows you how to change the PHP timezone for your hosting account should you wish to use a different timezone for your PHP apps.

To change the PHP timezone:

  1. Sign in to your HostM hosting account’s cPanel.

    Your cPanel access details are listed on the hosting account’s Info page in the Client Lounge.

  2. Under the Software heading, select Select PHP Version.

  3. Select Options at the top of the page.

  4. Click the current value for 'date.timezone'.

  5. Enter a new value into the field as desired.

    For instance, you could enter America/New_York into the field if you wanted to use New York’s timezone for your PHP apps.

Your new PHP timezone should take effect immediately.

The PHP timezone setting affects all PHP apps within the same hosting account. If you’d like to set a different timezone for each app, use the date_default_timezone_set function in your PHP code for each app.

Love our guides? HostM offers professional and helpful web hosting services with unlimited features and renewal rates that actually match our advertised rates.