Setting the timezone for php in the php.ini file
Written by Tim SissonIf 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.
- Open your php.ini file with the File manager in cPanel
- Add the following line of code to top of your php.ini file
- Replace "US/Central" with the timezone from here that corresponds to the time you want to display
- Click "Save"
- Now, you can check your phpinfo.php page to verify the change took place
date.timezone = "US/Central"
| BEFORE: | AFTER: |
|---|---|
![]() |
![]() |
If you need further assistance please feel free to ask a question on our support center.
Like this Article?
Tweet
Latest Questions
If you need some help, submit your question to our Community!
We guarantee a response within 60 minutes (8am - 9pm EST, Monday - Friday)
Recent QuestionsNeed 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 |





