If you notice the correct time is not displaying in your PHP scripts the likely culprit is that the hosting server is in a different timezone. You can easily resolve this by adding a line of code to your php.ini file. The location you set in the code will determine the time to display in your PHP scripts.

How to Set the PHP Timezone:

  1. Open your php.ini file with the File Manager in cPanel
  2. Add the following line of code to top of your php.ini file
    date.timezone = "US/Central"
  3. Replace "US/Central" with the timezone from here that corresponds to the time you want to display.
  4. Once you have entered the desired timezone, click the Save Changes button to save the file.
  5. Now, you can check your phpinfo.php page to verify the change took place.
    Before:After:
    timezone_3 timezone_4

If you need further assistance please feel free to ask a question on our support center.

Did you find this article helpful?

We value your feedback!

Why was this article not helpful? (Check all that apply)
The article is too difficult or too technical to follow.
There is a step or detail missing from the instructions.
The information is incorrect or out-of-date.
It does not resolve the question/problem I have.
How did you find this article?
Please tell us how we can improve our Support Center:
Email Address
Optional, but our team may contact you for more information.
Like this Article?

Post a Comment

Name:
Email Address:
Comment:
Are you a bot?
Submit

Please note: Your name and comment will be displayed, but we will not show your email address.

Related Questions

Here are a few questions related to this article that our customers have asked:
Ooops! It looks like there are no questions about this page.
Would you like to ask a question about this page? If so, click the button below!
Ask a Question

Need more Help?

Search

Ask the Community!

Get help with your questions from our community of like-minded hosting users and InMotion Hosting Staff.

Current Customers

Chat: Click to Chat Now E-mail: support@InMotionHosting.com
Call: 888-321-HOST (4678) Ticket: Submit a Support Ticket

Not a Customer?

Get web hosting from a company that is here to help. Sign up today!