How to modify the PHP timezone setting?

If your website is hosted on shared hosting, you may not be able to change the Global time configuration of that server. However, you can surely add a PHP function called date_default_timezone_set for your website. Please refer to the following code to set the time zone that you required. 

<?php
date_default_timezone_set("America/Denver");
echo date_default_timezone_get();
?>

You can get the list of PHP timezone details from PHP > Timezone.

Related Articles

How to choose an OS lower than Windows 2012 with 1 GB RAM?

We don't offer Windows 2008 Server OS anymore. We offer Windows Server OS 2012, 2016 and 2019....

List of Database connection file location of various CMS.

Here is the list of  Database connection file locations of various CMS in cPanel. If you are...

Comparison between Plesk and SolidCP ControlPanel.

Please refer to the below table which is showing the comparison between Plesk and SolidCP Control...

Where do i put my review for Accuwebhosting.com?

Here, is a list of website links where you can put your reviews for Accuwebhosting....

How to set outlook rule to receive emails to inbox?

You may face an issue where your emails are moving to the recipient spam box instead of Outlook...

  • 0 Users Found This Useful

Was this answer helpful?