Last modified: 2014-08-27 08:34:06 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T72032, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 70032 - Timezone of Windows/XAMPP server not set as default for users
Timezone of Windows/XAMPP server not set as default for users
Status: UNCONFIRMED
Product: MediaWiki
Classification: Unclassified
User preferences (Other open bugs)
1.23.2
PC All
: Low normal (vote)
: ---
Assigned To: Nobody - You can work on this!
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2014-08-26 13:25 UTC by Tony Mach
Modified: 2014-08-27 08:34 UTC (History)
2 users (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments

Description Tony Mach 2014-08-26 13:25:47 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.
Comment 1 Andre Klapper 2014-08-26 18:50:17 UTC
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)?
Comment 2 Tony Mach 2014-08-27 08:32:01 UTC
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
Comment 3 Tony Mach 2014-08-27 08:34:06 UTC
One more thing:
PHP/5.5.6 on Windows Server 2012 
- and -
PHP/5.5.11 on Windows 7 SP1

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links