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 TLS in Google Chrome, Mozilla Firefox and Internet Explorer?

Here are the steps you can follow to enable TLS in different browsers: Firefox Type...

"which" command in Linux

which is a powerful command used in SSH environment to find out path of perl script, php...

Does Mobile application requires hosting service?

Yes, you need a hosting service for the application backend to manage the following thing....

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

List of Database connection file location of various CMS.

Here is the list of  Database connection file locations of various CMS in cPanel. If you are...

  • 0 Users Found This Useful

Was this answer helpful?