[Mediawiki-l] How to correctly set up timezone with DST
heiner.wulfhorst at intermoves.de
heiner.wulfhorst at intermoves.de
Mon Mar 30 14:43:46 UTC 2009
Hi Guys,
we are really frustrated as our wiki is showing the wrong time.
Here's the part of our LocalSettings (as seen on
http://www.mediawiki.org/wiki/Manual_talk:Timezone):
#Set Default Timezone
$wgLocaltimezone = "Europe/Berlin";
$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;
#$wgLocalTZoffset = date("Z") / 60 + date("I") * 60;
# putenv("TZ=$oldtz");
Server's and php's time is right:
[root at servlet ~]# php -r 'echo date("r");'
Mon, 30 Mar 2009 15:57:03 +0200
Our Wiki is always 2 hours wrong:
Server time13:59
Local time15:59
Offset 02:00
Kind regards,
Heiner Wulfhorst
Intermoves AG
Technologiepark 19
33100 Paderborn
* Tel. + 49 (0) 52 51 16 13-0
* Fax + 49 (0) 52 51 16 13-99
* mailto:heiner.wulfhorst at intermoves.de
Vorstand: Volker Herold
Aufsichtsratvorsitzender: Prof. Dr. Uwe Kern
Sitz der Gesellschaft: Paderborn
Registergericht: Paderborn, HRB 3592
More information about the MediaWiki-l
mailing list