WordPress.org

Make WordPress Core

Ticket #11665: 11665.2.diff

File 11665.2.diff, 918 bytes (added by ryan, 11 years ago)
  • wp-settings.php

     
    1818set_magic_quotes_runtime(0);
    1919@ini_set('magic_quotes_sybase', 0);
    2020
    21 if ( function_exists('date_default_timezone_set') )
    22         date_default_timezone_set('UTC');
    23 
    2421/**
    2522 * Turn register globals off.
    2623 *
     
    719716// Load in support for template functions which the theme supports
    720717require_if_theme_supports( 'post-thumbnails', ABSPATH . WPINC . '/post-thumbnail-template.php' );
    721718
     719// Set the timezone
     720if ( function_exists('date_default_timezone_set') ) {
     721        if ( $timezone_string = get_option( 'timezone_string' ) )
     722                @date_default_timezone_set( $timezone_string );
     723        else
     724                @date_default_timezone_set(ini_get('date.timezone') ? ini_get('date.timezone') : 'UTC');
     725}
     726
    722727/**
    723728 * Runs just before PHP shuts down execution.
    724729 *