Hi List,
i don't like pushing own questions back on top. But after waiting about one week with no single reaction from the list and my boss getting impatient, i see no other solution.
Could someone _please_ help me?
With regards,
Heiner Wulfhorst
mediawiki-l-bounces@lists.wikimedia.org schrieb am 30.03.2009 16:43:46:
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@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@intermoves.de
Vorstand: Volker Herold Aufsichtsratvorsitzender: Prof. Dr. Uwe Kern Sitz der Gesellschaft: Paderborn Registergericht: Paderborn, HRB 3592 _______________________________________________ MediaWiki-l mailing list MediaWiki-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-l
Hi Heiner,
I'm afraid, I'm not firm enough with php to comment on your code, but I've just checked in my wiki and found the following:
1. Afaik the date/time-settings are per user and can be influenced in the user's settings.
2. When I check the date/time-settings on my server, they show the correct local time: wiki-h00:~ # date Mon Apr 6 09:40:44 CEST 2009 When I look at my own user's settings in the wiki I get the following output: Aktuelle Zeit auf dem Server: 07:39 Ortszeit: 09:39 I get this apparently incorrect servertime and correct localtime after I clicked on the button "Vom Browser übernehmen"...
I remember being confused about this the first time I set up my wiki and I gave up finding a wikiwide solution. I think the idea behind this user-related time setting is based on a wiki being open to users all around the world and so every user should be able to set his or her correct time...
It would be nice if there were a way to automatically transfer the browser-settings at login, but as I said before, I gave up searching because I don't speak php fluently enough.
So - please, I second Heiner's question: Is there a way to get the timesetting-process working automatically?
Greetings Katharina
heiner.wulfhorst@intermoves.de schrieb am 06.04.2009 09:33:
Hi List,
i don't like pushing own questions back on top. But after waiting about one week with no single reaction from the list and my boss getting impatient, i see no other solution.
Could someone _please_ help me?
With regards,
Heiner Wulfhorst
mediawiki-l-bounces@lists.wikimedia.org schrieb am 30.03.2009 16:43:46:
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@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@intermoves.de
Vorstand: Volker Herold Aufsichtsratvorsitzender: Prof. Dr. Uwe Kern Sitz der Gesellschaft: Paderborn Registergericht: Paderborn, HRB 3592 _______________________________________________ MediaWiki-l mailing list MediaWiki-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-l
MediaWiki-l mailing list MediaWiki-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-l
heiner.wulfhorst@intermoves.de schrieb am 06.04.2009 09:33:
Hi List, mediawiki-l-bounces@lists.wikimedia.org schrieb am 30.03.2009 16:43:46:
Hi Guys,
we are really frustrated as our wiki is showing the wrong time.
Kind regards, Heiner Wulfhorst
This worked for us.
#Set Default Timezone #We are hardcoding EST. $wgLocalTZoffset = date("Z")/60; date_default_timezone_set ('America/New_York' );
Good luck! -Courtney
mediawiki-l@lists.wikimedia.org