Difference between revisions of "Configure timezone on a wiki"
From Organic Design wiki
(→Changing the default timezone for a wiki: /60 not /3600) |
(Change source-code blocks to standard format) |
||
Line 6: | Line 6: | ||
== Changing the default timezone for a wiki == | == Changing the default timezone for a wiki == | ||
The default timezone for the server should be set to UTC, so if a particular wiki needs to have a different default from that, the usual way to set it is in the ''LocalSettings.php'' file as follows: | The default timezone for the server should be set to UTC, so if a particular wiki needs to have a different default from that, the usual way to set it is in the ''LocalSettings.php'' file as follows: | ||
− | + | <source lang="php"> | |
$wgLocaltimezone="Pacific/Auckland"; | $wgLocaltimezone="Pacific/Auckland"; | ||
putenv("TZ=$wgLocaltimezone"); | putenv("TZ=$wgLocaltimezone"); | ||
$wgLocalTZoffset = date("Z") / 60; | $wgLocalTZoffset = date("Z") / 60; | ||
− | </ | + | </source> |
== See also == | == See also == | ||
*[[MW:Manual:$wgLocaltimezone]] | *[[MW:Manual:$wgLocaltimezone]] | ||
*[[MW:Manual:$wgLocalTZoffset]] | *[[MW:Manual:$wgLocalTZoffset]] |
Latest revision as of 18:11, 22 May 2015
Configure timezone on a wiki Organic Design procedure |
Changing the default timezone for a wiki
The default timezone for the server should be set to UTC, so if a particular wiki needs to have a different default from that, the usual way to set it is in the LocalSettings.php file as follows:
$wgLocaltimezone="Pacific/Auckland";
putenv("TZ=$wgLocaltimezone");
$wgLocalTZoffset = date("Z") / 60;