Sunday, April 8, 2007

How to set the timezone for mediawiki?

There are times when the physical server and the mediawiki users are in different timezones. Here is how to adjust the timezone in mediawiki. Add the following lines to your LocalSettings.php


$wgLocaltimezone="America/Los_Angeles";
putenv("TZ=$wgLocaltimezone");
$wgLocalTZoffset = date("Z") / 60;

Note: You can find your local time zone text here.

No comments: