Skip to content

Commit d450869

Browse files
committedMar 26, 2012
Issue #14086: Default administrator timezone to server timezone. (partial fix).
1 parent a469bdc commit d450869

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed
 

‎core.php

+5-1
Original file line numberDiff line numberDiff line change
@@ -237,7 +237,11 @@ function __autoload( $className ) {
237237
require_api( 'authentication_api.php' );
238238
if( auth_is_user_authenticated() ) {
239239
require_api( 'user_pref_api.php' );
240-
date_default_timezone_set( user_pref_get_pref( auth_get_current_user_id(), 'timezone' ) );
240+
241+
$t_user_timezone = user_pref_get_pref( auth_get_current_user_id(), 'timezone' );
242+
if ( !is_blank( $t_user_timezone ) ) {
243+
date_default_timezone_set( $t_user_timezone );
244+
}
241245
}
242246
}
243247

0 commit comments

Comments
 (0)
Please sign in to comment.