Help:Timezone

From lensowiki

Jump to: navigation, search

  The default Timezone (tz) for users who have not specified a custom offset may be configured manually.

Primary Method

#Set Default Timezone
$wgLocaltimezone = "America/Los_Angeles";
$oldtz = getenv("TZ");
putenv("TZ=$wgLocaltimezone");
$wgLocalTZoffset = date("Z") / 3600;
putenv("TZ=$oldtz");
$wgLocaltimezone = "Europe/London";
$wgLocaltimezone = "Asia/Taipei";

Note: This timezone will be used in:

Note: Upload and deletion logs will probably still be listed in UTC
Note: This method has been confirmed to work on MediaWiki: 1.5.6.

Unconfirmed Methods

$wgLocalTZoffset = date("Z") / 3600;

$wgLocalTZoffset = 13;

#Set Default Timezone
$wgLocaltimezone = "Europe/Amsterdam";

#Calculate the timezone offset with UTC
$oldtz = getenv("TZ");
putenv("TZ=$wgLocaltimezone");
$wgLocalTZoffset = date("Z") / 3600 + Date("I");
putenv("TZ=$oldtz");

Note: The methods in this section are unconfirmed and may not work properly.

Personal tools
Namespaces
Variants
Actions
Navigation
Toolbox