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 do I check current established connections and network utilization of my VPS?

Windows VPS   For current established connections and processes:   Go to Run Type cmd, hit...

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

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 to check VPS bandwidth usage from Accuwebhosting Client area?

You can easily view your VPS bandwidth report from the bandwidth meter tool. Please refer to the...

How to modify a hosts file in Windows 7, Windows 8/10, Mac OS and Ubuntu?

By Editing Host File, you can point IP Address for a Domain in your local system.   Windows 7 :...

  • 0 Users Found This Useful

Was this answer helpful?