Loading...

Knowledge Base

How to Change Reported Time Zone in PHP

You can change the time zone displayed or returned in the PHP application. Learn how to change the reported time zone in PHP.

Note: Check the list of supported time zones by PHP at http://php.net/timezones.

Configure Time Zone in PHP

Follow these steps to change your reported time zone in PHP:

  1. Log in to your Bluehost Account Manager.
  2. Click Hosting from the side navigation menu to the left.
    Hosting option
  3. Scroll down to the Quick Links tile and click the FILE MANAGER button.
    FILE MANGER button
  4. Open the public_html folder.
  5. Click the Settings button at the top right corner.
    Settings button, Show hidden files check box, and Save button
  6. Make sure that there is a checkmark on Show Hidden Files (dotfiles), then hit Save.
  7. Navigate to the folder that contains the .htaccess file and click the Edit icon at the Toolbar.

    Pro Tip: Alternatively, you can right-click on the selected file and click on Edit from the drop-down menu.

  8. Click on the Edit button again.
  9. Press Ctrl+F (Shortcut to find the section easily) and enter the <IfModule lsapi_module>.
  10. For example, you can add the line php_value date.timezone "America/Denver." Check the list of supported time zones by PHP at http://php.net/timezones.
    Time Zone
  11. Click the Save Changes button on the top-right corner of your screen.

Summary

To adjust the time zone for a PHP application, you will need to add a line in your .htaccess file. Log in to your Account Manager, then from there, access your File Manager. Once you open your File Manager, look for your .htaccess file and make the necessary changes to your "php_value date.timezone" to successfully change the reported time zone in PHP.

If you need further assistance, feel free to contact us via Chat or Phone:

  • Chat Support - While on our website, you should see a CHAT bubble in the bottom right-hand corner of the page. Click anywhere on the bubble to begin a chat session.
  • Phone Support -
    • US: 888-401-4678
    • International: +1 801-765-9400

You may also refer to our Knowledge Base articles to help answer common questions and guide you through various setup, configuration, and troubleshooting steps.

Did you find this article helpful?

 
* Your feedback is too short

Loading...