WordPress.org

Make WordPress Core


Ignore:
Timestamp:
04/13/2011 05:30:02 PM (9 years ago)
Author:
ryan
Message:

Remove PHP4 timezone support. Props hakre. fixes #16970

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-includes/functions.php

    r17613 r17637  
    121121    $timezone_formats = array( 'P', 'I', 'O', 'T', 'Z', 'e' );
    122122    $timezone_formats_re = implode( '|', $timezone_formats );
    123     if ( preg_match( "/$timezone_formats_re/", $dateformatstring ) && wp_timezone_supported() ) {
     123    if ( preg_match( "/$timezone_formats_re/", $dateformatstring ) ) {
    124124        $timezone_string = get_option( 'timezone_string' );
    125125        if ( $timezone_string ) {
     
    40634063 */
    40644064function wp_timezone_override_offset() {
    4065     if ( !wp_timezone_supported() ) {
    4066         return false;
    4067     }
    40684065    if ( !$timezone_string = get_option( 'timezone_string' ) ) {
    40694066        return false;
     
    40764073    }
    40774074    return round( timezone_offset_get( $timezone_object, $datetime_object ) / 3600, 2 );
    4078 }
    4079 
    4080 /**
    4081  * Check for PHP timezone support
    4082  *
    4083  * @since 2.9.0
    4084  *
    4085  * @return bool
    4086  */
    4087 function wp_timezone_supported() {
    4088     $support = false;
    4089     if (
    4090         function_exists( 'date_create' ) &&
    4091         function_exists( 'date_default_timezone_set' ) &&
    4092         function_exists( 'timezone_identifiers_list' ) &&
    4093         function_exists( 'timezone_open' ) &&
    4094         function_exists( 'timezone_offset_get' )
    4095     ) {
    4096         $support = true;
    4097     }
    4098     return apply_filters( 'timezone_support', $support );
    40994075}
    41004076
Note: See TracChangeset for help on using the changeset viewer.