Change Time Zone on your site with htaccess file

In my server there are some sites from Turkey, some of from England, some of from Germany. I have got timezone problem in that sites. I found easy solution for this. Just add .htaccess this code:

php_value date.timezone "Europe/Istanbul"


php_value date.timezone "America/Chicago"

You can test date is change or not

 echo date('d-m-Y H:i:s');
 if you unable to fixed this issue then just add this code in your .htaccess file
Example : SetEnv TZ Europe/London or SetEnv Asia/Karachi or SetEnv IN Asia/Calcutta

Note:Please use only one at a time

Sr. Software Engineer

Posted in PHP

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

Recent Posts
%d bloggers like this: