Skip to content

Commit

Permalink
do not set timezone to 'UTC', fallback to php date.timezone setting; …
Browse files Browse the repository at this point in the history
…or set as admin defines in timezone_string
  • Loading branch information
leiww committed Jan 14, 2010
1 parent fd6a5d4 commit 5ec451c
Showing 1 changed file with 14 additions and 3 deletions.
17 changes: 14 additions & 3 deletions wp-settings.php
Expand Up @@ -18,9 +18,6 @@
set_magic_quotes_runtime(0);
@ini_set('magic_quotes_sybase', 0);

if ( function_exists('date_default_timezone_set') )
date_default_timezone_set('UTC');

/**
* Turn register globals off.
*
Expand Down Expand Up @@ -391,6 +388,20 @@ function is_admin() {
if ( !defined('WP_CONTENT_URL') )
define( 'WP_CONTENT_URL', get_option('siteurl') . '/wp-content'); // full url - WP_CONTENT_DIR is defined further up

if ( function_exists('date_default_timezone_set') )
{
if ( !$timezone_string = get_option( 'timezone_string' ) )
{
//Note: not set timezone, fallback to php date.timezone setting.
//date_default_timezone_set('UTC');
;
}
else
{
date_default_timezone_set($timezone_string);
}
}

/**
* Allows for the plugins directory to be moved from the default location.
*
Expand Down

0 comments on commit 5ec451c

Please sign in to comment.