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 ImunifyAV+ is useful?

ImunifyAV+ is an effective anti-malware service. It is used to scan and detect the malware lied...

How to register domain and make the payment?

If you are a registered client, you can directly refer to the following steps to order a new...

Comparison of control panels Plesk VS WHM/cPanel.

Web Hosting control panels are very useful to manage your servers with a front-end graphical web...

Load balancing vs Fail Over Protection

Load balancing and failover both are different methods. In load balancing, all the requests...

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....

  • 0 Users Found This Useful

Was this answer helpful?