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

Free Anti-Malwares/ for Windows and Linux based Servers

As we all know, the internet is open and your server may receive threats of malware and Spywares...

How do i setup rDNS/PTR record at Accuwebhosting?

Client can't set rDNS record at their end. You will need to submit a support ticket with the IP...

Diagnostic Tools - Check Website Connection, Website Availability

Ping Ping is a command to check whether a destination computer system is working on a network or...

  • 0 Users Found This Useful

Was this answer helpful?