Ticket #10915: use.current_time.10915.diff
File use.current_time.10915.diff, 3.2 KB (added by , 15 years ago) |
---|
-
wp-includes/link-template.php
286 286 function get_year_link($year) { 287 287 global $wp_rewrite; 288 288 if ( !$year ) 289 $year = gmdate('Y', time()+(get_option('gmt_offset') * 3600));289 $year = gmdate('Y', current_time('timestamp')); 290 290 $yearlink = $wp_rewrite->get_year_permastruct(); 291 291 if ( !empty($yearlink) ) { 292 292 $yearlink = str_replace('%year%', $year, $yearlink); … … 308 308 function get_month_link($year, $month) { 309 309 global $wp_rewrite; 310 310 if ( !$year ) 311 $year = gmdate('Y', time()+(get_option('gmt_offset') * 3600));311 $year = gmdate('Y', current_time('timestamp')); 312 312 if ( !$month ) 313 $month = gmdate('m', time()+(get_option('gmt_offset') * 3600));313 $month = gmdate('m', current_time('timestamp')); 314 314 $monthlink = $wp_rewrite->get_month_permastruct(); 315 315 if ( !empty($monthlink) ) { 316 316 $monthlink = str_replace('%year%', $year, $monthlink); … … 334 334 function get_day_link($year, $month, $day) { 335 335 global $wp_rewrite; 336 336 if ( !$year ) 337 $year = gmdate('Y', time()+(get_option('gmt_offset') * 3600));337 $year = gmdate('Y', current_time('timestamp')); 338 338 if ( !$month ) 339 $month = gmdate('m', time()+(get_option('gmt_offset') * 3600));339 $month = gmdate('m', current_time('timestamp')); 340 340 if ( !$day ) 341 $day = gmdate('j', time()+(get_option('gmt_offset') * 3600));341 $day = gmdate('j', current_time('timestamp')); 342 342 343 343 $daylink = $wp_rewrite->get_day_permastruct(); 344 344 if ( !empty($daylink) ) { -
wp-includes/general-template.php
1125 1125 echo "\n\t</tr>\n\t<tr>\n\t\t"; 1126 1126 $newrow = false; 1127 1127 1128 if ( $day == gmdate('j', (time() + (get_option('gmt_offset') * 3600))) && $thismonth == gmdate('m', time()+(get_option('gmt_offset') * 3600)) && $thisyear == gmdate('Y', time()+(get_option('gmt_offset') * 3600)) ) 1128 if ( $day == gmdate('j', current_time('timestamp')) && $thismonth == gmdate('m', current_time('timestamp')) && $thisyear == gmdate('Y', current_time('timestamp')) ) 1129 if ( $day == gmdate('j', current_time('timestamp')) && $thismonth == gmdate('m', current_time('timestamp')) && $thisyear == gmdate('Y', current_time('timestamp')) ) 1129 1130 echo '<td id="today">'; 1130 1131 else 1131 1132 echo '<td>'; -
wp-admin/includes/template.php
2567 2567 2568 2568 // echo '<label for="timestamp" style="display: block;"><input type="checkbox" class="checkbox" name="edit_date" value="1" id="timestamp"'.$tab_index_attribute.' /> '.__( 'Edit timestamp' ).'</label><br />'; 2569 2569 2570 $time_adj = time() + (get_option( 'gmt_offset' ) * 3600);2570 $time_adj = current_time('timestamp'); 2571 2571 $post_date = ($for_post) ? $post->post_date : $comment->comment_date; 2572 2572 $jj = ($edit) ? mysql2date( 'd', $post_date, false ) : gmdate( 'd', $time_adj ); 2573 2573 $mm = ($edit) ? mysql2date( 'm', $post_date, false ) : gmdate( 'm', $time_adj );