Last modified: 2014-08-27 08:34:06 UTC
I am using a Windows server with XAMPP to host MediaWiki 1.23.2. The Windows machine is set to "Europe/Berlin" timezone (UTC+2 currently due to DST). When I go at 15:12 (local time, DST) to the preferences of a user I get shown the following: Server time: 13:12 Local time: 13:12 Time zone: Other (specifiy offset) (empty field for offset) This is in both cases the UTC time. I tried to set the wgLocaltimezone, but it seems to already be set correctly!? If I add (to e.g. LocalSettings.php): print("$wgLocaltimezone: "); print $wgLocaltimezone; print(", $wgLocalTZoffset: "); print $wgLocalTZoffset; then I see "Europe/Berlin" as wgLocaltimezone, and wgLocalTZoffset is already set to 120. I would like to (simply?) change the setup so every user has by default the Europe/Berlin timezone.
Thanks for taking the time to report this! Which Windows version is this about, and which PHP version? Is the output of date('Z') / 60; also 120, as described in https://www.mediawiki.org/wiki/Manual:$wgLocalTZoffset (wondering on which level the issue happens)?
OK, I made one mistake in the bug-description: The debug output needs to be at the end of Setup.php to output the values as above. (I moved the code to LocalSettings.php, but forgot the comment out in Setup.php) Beginning of Setup.php (or beginning of LocalSettings.php): - wgLocaltimezone is empty - wgLocalTZoffset is empty - date('Z') / 60 is "120" End of Setup.php - wgLocaltimezone is "Europe/Berlin" - wgLocalTZoffset is "120" - date('Z') / 60 is "120" Tested this both on Windows 7 SP1 and Windows Server 2012 Standard. PHP is PHP/5.5.11
One more thing: PHP/5.5.6 on Windows Server 2012 - and - PHP/5.5.11 on Windows 7 SP1