Adjusting timezone in MediaWiki
Posted by: Hofteigur
Posted on: 2007-03-08 21:27:00
I'm having a trouble getting my MediaWiki install to use the time zone of my choosing instead of the server's.
I've tried all the ides I think might apply from http://meta.wikimedia.org/wiki/Help:Timezone
This is the primary method I've tried:
In reply to:#Set Default Timezone
$wgLocaltimezone = "Atlantic/Reykjavik";
$oldtz = getenv("TZ");
putenv("TZ=$wgLocaltimezone");
# Versions before 1.7.0 used $wgLocalTZoffset as hours.
# After 1.7.0 offset as minutes
$wgLocalTZoffset = date("Z") / 60;
putenv("TZ=$oldtz");
To which, and all other attempts recommended on that Wiki page, I get this error:
In reply to:Parse error: syntax error, unexpected T_VARIABLE in /home/.genet/hofteigur/griffin-keep.net/w/LocalSettings.php on line 129
Where the line number applies to the first command, or "$wgLocaltimezone" in this instance.
Any ideas what causes this? I'd really like to see my own (and the other users') timezone when leaving signatures.
[Edited: code bbcode didn't work so I replaced it with quotes.]Edited by hofteigur on 03/08/07 09:31 PM (server time).