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:
- Click Sign Up / Log In at the top of this page.
- Select Hosting Manager from the drop-down menu.
- Enter your username and password and click Log In.
- On the Home page, click Files or the [ v ] arrow button on the right side, then click File Manager.
- Select Web Root (public_html/www) and click Go.
- Find the php.ini file.
- 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.
- A text editor popup will display, just click Edit.
- Add the following code at the top of your php.ini file.
date.timezone = "US/Central"
- Replace US/Central to your preferred time zone. The location you set determines the time that displays in your PHP scripts.
- Click Save Changes to update file.
Congratulations! You just changed your time zone for PHP.
Fantastic...Thank you for your feedback =)
Sorry... Please submit a support ticket or try another search.