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:
- Log in to your Bluehost Account Manager.
- Click Hosting from the side navigation menu to the left.
- Scroll down to the Quick Links tile and click the FILE MANAGER button.
- Open the public_html folder.
- Click the Settings button at the top right corner.
- Make sure that there is a checkmark on Show Hidden Files (dotfiles), then hit Save.
- 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.
- Click on the Edit button again.
- Press Ctrl+F (Shortcut to find the section easily) and enter the <IfModule lsapi_module>.
- 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.
- 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.