Configure timezone on a wiki
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:
However, for NZST there is a bug in PHP which prevents the timezone from changing to NZDT properly so the setting needs to be set and updated for the wiki manually when it changes, for example:
Signatures
The way the signature timestamps work in MediaWiki is not based on the users preferences, but is instead a global setting so that discussions and other communications don't have differing timezones. However, if as for the NZST problem the $wgLocalTZoffset has been set, then this will not apply to signatures, and the only way to fix this is with a code-base hack :-(
The following adjustments can be made to the signature rendering code in includes/parser/Parser.php at about line 3800. The $tz variable must be calculated from the local timezone, and the normal condition must be removed by prepending a 0 && as follows: