Adjusting timezone in MediaWiki

apps

#1

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:

[quote]#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”);[/quote]

To which, and all other attempts recommended on that Wiki page, I get this error:

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.]


#2

Well… seems this isn’t the only problem I get.

These snippets should disable anonymous editing and creation of new users:

[quote]# This snippet prevents new registrations from anonymous users

(Sysops can still create user accounts)

$wgGroupPermissions[’*’][‘createaccount’] = false;

This snippet prevents editing from anonymous users

$wgGroupPermissions[’*’][‘edit’] = false;[/quote]
Same error as above. Different line number of course…


#3

Bah… both problems fixed by placing the snippets higher in the LocalSettings.php…


#4

Did you ever get a response or figure out what the problem was?

I’ve just setup a wiki and was trying to use those same commands to lock it down. I don’t see any errors, but it isn’t doing anything either.