MilesWeb Hosting Forum

Web Hosting Technical Support => How To's => Topic started by: Dipak Bhoi on June 18, 2014, 04:06:48 PM

Title: How can I change timezone for my webhosting account ?
Post by: Dipak Bhoi on June 18, 2014, 04:06:48 PM
Hello guys,

This post will help you to show your local time zone on your website instead of server time.

You can change the timezone for your account  by adding this rule into .htaccess file.

SetEnv TZ Timezone

For example, if you wish to change the timezone to India, you should add this line to your .htaccess file:

SetEnv TZ Asia/Kolkata

Save and close the file.

Now check your scripts will use your local time instead of the server time. You can check the list of the available timezones (http://us2.php.net/manual/en/timezones.php).

Enjoy !!!

Title: Re: How can I change timezone for my webhosting account ?
Post by: Dipak Bhoi on February 21, 2015, 03:17:40 PM
Hello folks,

If above setting is not working for you then don't worry. Here is an another way to change timezone for your webhosting account. You just need to add the below line into your .htaccess file.

Quotephp_value date.timezone "Asia/Calcutta"

Enjoy !!! :)