Loading...

Knowledge Base

How to Change Reported Time Zone in PHP

Adjusting the time zone settings on your Bluehost-hosted site helps ensure that time-sensitive features like scheduled tasks and timestamps function accurately. It’s a quick way to keep your site aligned with your local time or your audience’s region.

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. Go to the FILES & ACCESS tab and click MANAGE on the File Manager tile.
    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 check mark on Show Hidden Files (dotfiles), then hit Save.
  7. Navigate to the folder that contains the .htaccess file and click the Edit icon in the Toolbar.
  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 in 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 access your File Manager from there. 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...