Changeset 38804
- Timestamp:
- 10/17/2016 08:09:11 AM (8 years ago)
- Location:
- trunk
- Files:
-
- 1 added
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/functions.php
r38686 r38804 92 92 93 93 if ( false === $i ) { 94 if ( ! $gmt ) 95 $i = current_time( 'timestamp' ); 96 else 97 $i = time(); 98 // we should not let date() interfere with our 99 // specially computed timestamp 100 $gmt = true; 94 $i = current_time( 'timestamp', $gmt ); 101 95 } 102 96 … … 107 101 $req_format = $dateformatstring; 108 102 109 $datefunc = $gmt? 'gmdate' : 'date';110 111 103 if ( ( !empty( $wp_locale->month ) ) && ( !empty( $wp_locale->weekday ) ) ) { 112 $datemonth = $wp_locale->get_month( $datefunc( 'm', $i ) );104 $datemonth = $wp_locale->get_month( date( 'm', $i ) ); 113 105 $datemonth_abbrev = $wp_locale->get_month_abbrev( $datemonth ); 114 $dateweekday = $wp_locale->get_weekday( $datefunc( 'w', $i ) );106 $dateweekday = $wp_locale->get_weekday( date( 'w', $i ) ); 115 107 $dateweekday_abbrev = $wp_locale->get_weekday_abbrev( $dateweekday ); 116 $datemeridiem = $wp_locale->get_meridiem( $datefunc( 'a', $i ) );117 $datemeridiem_capital = $wp_locale->get_meridiem( $datefunc( 'A', $i ) );108 $datemeridiem = $wp_locale->get_meridiem( date( 'a', $i ) ); 109 $datemeridiem_capital = $wp_locale->get_meridiem( date( 'A', $i ) ); 118 110 $dateformatstring = ' '.$dateformatstring; 119 111 $dateformatstring = preg_replace( "/([^\\\])D/", "\\1" . backslashit( $dateweekday_abbrev ), $dateformatstring ); … … 143 135 } 144 136 } 145 $j = @ $datefunc( $dateformatstring, $i );137 $j = @date( $dateformatstring, $i ); 146 138 147 139 /**
Note: See TracChangeset
for help on using the changeset viewer.