Sign Up / Log In
Need help?
8000 320 414
Online Support Web Hosting

How to change the PHP time zone using php.ini

PHP scripts usually follow your hosting server’s time zone. If you are in a different time zone, you can easily change this by adding a few codes in the php.ini file.

To change the PHP time zone, follow the steps below:

  1. Click Sign Up / Log In at the top of this page.
  2. Select Hosting Manager from the drop-down menu.
  3. Enter your username and password and click Log In.
  4. On the Home page, click Files or the [ v ] arrow button on the right side, then click File Manager.
  5. Select Web Root (public_html/www) and click Go.
  6. Find the php.ini file.
  7. Click php.ini file, then select Edit button on the upper part of the page.
    You may also right-click php.ini, then select Edit.
  8. A text editor popup will display, just click Edit.
  9. Add the following code at the top of your php.ini file.
    date.timezone = "US/Central"
  10. Replace US/Central to your preferred time zone. The location you set determines the time that displays in your PHP scripts.
  11. Click Save Changes to update file.

Congratulations! You just changed your time zone for PHP.

Was this helpful? Yes No 54% of people found this helpful.
we're
online
Need Help? Chat Now