Setting PHP’s Per-Directory TimeZone via .htaccess

For setting the time-zone per PHP script’s folder/directory…

Edit the website’s .htaccess file and add in the proper “php_value” setting (note that you can’t use “php_admin_value” in .htaccess files) –

<IfModule php5_module>
php_value date.timezone "America/New_York"
</IfModule>

 

or put this in the code:

date_default_timezone_set(“America/New_York”);

About the Author

Leave a Reply

Your email address will not be published. Required fields are marked *

Time limit is exhausted. Please reload CAPTCHA.

%d bloggers like this: