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 Remove IP Address from Gmail Blacklist?

If you are receiving bounce back emails from Gmail, your IP address might be on the Gmail...

How ImunifyAV+ is useful?

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

What are the Differences Between Forward Proxy and Reverse Proxy?

Generally, there are two types of proxy servers available which are Forward Proxy and Reverse...

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

PHP Fatal error: Cannot redeclare

If your browser saw an error message PHP Fatal error: Cannot redeclare function it is an issue...

  • 0 Users Found This Useful

Was this answer helpful?