From: Mark A. Hershberger Date: Sat, 2 Apr 2011 04:49:29 +0000 (+0000) Subject: Fix Bug#24308 where, on some platforms the date_create() function fails when the... X-Git-Tag: 1.31.0-rc.0~31084 X-Git-Url: http://git.cyclocoop.org/%7B%24admin_url%7Dmes_infos.php?a=commitdiff_plain;h=c930f93725a0a767560a85f696f3f39da175cd8a;p=lhc%2Fweb%2Fwiklou.git Fix Bug#24308 where, on some platforms the date_create() function fails when the timezone isn't specified. --- diff --git a/includes/Preferences.php b/includes/Preferences.php index 37563ddfdf..fd5f23369b 100644 --- a/includes/Preferences.php +++ b/includes/Preferences.php @@ -1202,7 +1202,8 @@ class Preferences { $prefill = array_fill_keys( array_values( $tzRegions ), array() ); $opt = array_merge( $opt, $prefill ); - $now = date_create( 'now' ); + global $wgLocaltimezone; + $now = date_create( 'now', $wgLocaltimezone ); foreach ( $tzs as $tz ) { $z = explode( '/', $tz, 2 );