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 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 enable CORS for your website?

A request for the website resource like images or fonts from outside of the origin website is...

How to make your ASP.Net applications secure?

Adding security to Web apps may not be great fun but it doesn't have to be hard. You can easily...

How to renew SSL?

If you have an existing SSL Certificate purchased from Acuwebhosting, you just need to update us...

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?