UnixServerAdmin

Server Administration & Management

How to change TimeZone using .htaccess

As you know, the server hosted for your website’s time zone might not the time zone that you want as you might purchased a hosting server hosted somewhere from your location.

Hence it is important if you could define the timezone from the server setting instead of working on each of the script.

Although you set set it to by .htaccess file

Open up your .htaccess file, enter the command as below :-

================
SetEnv TZ location
================

The location indicate the timezone that you want to set, for more information on the location information, you may refer to the URL as below. “http://www.php.net/manual/en/timezones.php”

Advertisements

March 5, 2011 Posted by | Apache, htaccess | , , | 2 Comments