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 check Ping Report from Windows 7, 8 and 10?

You can use our Ping testing tool to test Ping alert from your local system to our Denver...

How to fix : HTTP Error 500.30 After Publishing the application from Visual Studio?

We can use the web deploy function of visual studio to publish our application to the production...

How to enable "I'm Under Attack" mode in CloudFlare Panel?

Cloudflare provides additional protection called "I m under attack" for a website which is under...

How to activate SSL Certificate?

You can activate SSL Certificate to get secure connections on your website. Looking to purchase...

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?