How to modify the PHP timezone setting? Çap et

  • 0

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.


Bu cavab sizə kömək etdi?

<< Geri
Sign up for a newsletter

chat