Ticket #9588: 9588.17.diff
File 9588.17.diff, 1.7 KB (added by , 15 years ago) |
---|
-
wp-includes/functions.php
59 59 * @return int|string String if $type is 'gmt', int if $type is 'timestamp'. 60 60 */ 61 61 function current_time( $type, $gmt = 0 ) { 62 $gmtime = gmdate('U'); 62 63 switch ( $type ) { 63 64 case 'mysql': 64 return ( $gmt ) ? gmdate( 'Y-m-d H:i:s' ) : gmdate( 'Y-m-d H:i:s', ( time()+ ( get_option( 'gmt_offset' ) * 3600 ) ) );65 return ( $gmt ) ? gmdate( 'Y-m-d H:i:s' ) : gmdate( 'Y-m-d H:i:s', ( $gmtime + ( get_option( 'gmt_offset' ) * 3600 ) ) ); 65 66 break; 66 67 case 'timestamp': 67 return ( $gmt ) ? time() : time()+ ( get_option( 'gmt_offset' ) * 3600 );68 return ( $gmt ) ? $gmtime : $gmtime + ( get_option( 'gmt_offset' ) * 3600 ); 68 69 break; 69 70 } 70 71 } -
wp-settings.php
18 18 set_magic_quotes_runtime(0); 19 19 @ini_set('magic_quotes_sybase', 0); 20 20 21 if ( function_exists('date_default_timezone_set') )22 date_default_timezone_set('UTC');23 24 21 /** 25 22 * Turn register globals off. 26 23 * … … 719 716 // Load in support for template functions which the theme supports 720 717 require_if_theme_supports( 'post-thumbnails', ABSPATH . WPINC . '/post-thumbnail-template.php' ); 721 718 719 // Set the timezone 720 if ( 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 722 727 /** 723 728 * Runs just before PHP shuts down execution. 724 729 *