From c930f93725a0a767560a85f696f3f39da175cd8a Mon Sep 17 00:00:00 2001 From: "Mark A. Hershberger" Date: Sat, 2 Apr 2011 04:49:29 +0000 Subject: [PATCH] Fix Bug#24308 where, on some platforms the date_create() function fails when the timezone isn't specified. --- includes/Preferences.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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 ); -- 2.20.1