Contact Support : +64 220 256 070

Aimvm
Blog

How to change PHP application timezone using .htaccess file?

Posted on: August 20, 2014

You can use the .htaccess file on the document root of your domain to change the timezone of your php script/website. Please note changing server time is different process.

Here is how you can do it.

1) Open the File Manager option from the cPanel.

2) Open the .htaccess file(Create one if it is not there already)

3) Add the desired time zone of your choice.

Example: If you want to have Washington timezone then add:

php_value date.timezone “America/Washington”

Save and exit

4) You can get the codes for all the supported time zone from here Timezone

 

Search Blog