Page MenuHomePhabricator

Cleanup default timezone settings to use symbolic names, not offsets
Open, MediumPublic



{{REVISIONTIMESTAMP}} uses the server-wide timezone setting, which looks like
it's getting incorrectly set still through an old old system which only grabs
the current offset -- so at the moment we're actually using '120 minutes
offset' instead of 'Europe/Berlin' as the server default. D'oh!


This bit in CommonSettings.php needs to be removed:

if ( !isset( $wgLocaltimezone ) ) $wgLocaltimezone = 'UTC';
# Ugly hack warning! This needs smoothing out.
if ( $wgLocaltimezone ) {
    $oldtz = getenv( 'TZ' );
    putenv( "TZ=$wgLocaltimezone" );
    $wgLocalTZoffset = date( 'Z' ) / 60;
    putenv( "TZ=$oldtz" );

... and alas similar code appears to be in Setup.php now. :P

Language::userAdjust's path through 'System' or tz being '' should probably be
pulled up and run through the date_create / date_timezone_set stuff if
$wgLocaltimezone is set, preferable to $wgLocalTZOffset.

Or at least they need to be sorted out in some way. :P

Version: 1.20.x
Severity: normal



Event Timeline

bzimport raised the priority of this task from to Medium.Nov 22 2014, 12:07 AM
bzimport set Reference to bz32297.
bzimport added a subscriber: Unknown Object (MLST).

beau wrote:

I have submitted gerrit #6617 for review.

beau wrote:

The change has been merged.

beau wrote:

*** Bug 32282 has been marked as a duplicate of this bug. ***

I have reverted Gerrit change #6617 with Gerrit change 13865. That broke tests horribly.