Ticket #5970: humantime.diff
File humantime.diff, 2.9 KB (added by , 17 years ago) |
---|
-
opt/www/eclipsework/WPDev/wp-admin/edit-attachment-rows.php
65 65 } else { 66 66 $t_time = get_the_time(__('Y/m/d g:i:s A')); 67 67 $m_time = $post->post_date; 68 $time = get_post_time( );68 $time = get_post_time( 'G', true ); 69 69 if ( ( abs($t_diff = time() - $time) ) < 86400 ) { 70 70 if ( $t_diff < 0 ) 71 71 $h_time = sprintf( __('%s from now'), human_time_diff( $time ) ); -
opt/www/eclipsework/WPDev/wp-admin/edit-post-rows.php
44 44 if ( 'modified' == $column_name ) { 45 45 $t_time = get_the_modified_time(__('Y/m/d g:i:s A')); 46 46 $m_time = $post->post_modified; 47 $time = get_post_modified_time( );47 $time = get_post_modified_time('G', true); 48 48 } else { 49 49 $t_time = get_the_time(__('Y/m/d g:i:s A')); 50 50 $m_time = $post->post_date; 51 $time = get_post_time( );51 $time = get_post_time('G', true); 52 52 } 53 53 if ( ( abs(time() - $time) ) < 86400 ) { 54 54 if ( ( 'future' == $post->post_status) ) -
opt/www/eclipsework/WPDev/wp-admin/includes/template.php
379 379 if ( 'modified' == $column_name ) { 380 380 $t_time = get_the_modified_time(__('Y/m/d g:i:s A')); 381 381 $m_time = $page->post_modified; 382 $time = get_post_modified_time( );382 $time = get_post_modified_time('G', true); 383 383 } else { 384 384 $t_time = get_the_time(__('Y/m/d g:i:s A')); 385 385 $m_time = $page->post_date; 386 $time = get_post_time( );386 $time = get_post_time('G', true); 387 387 } 388 388 if ( ( abs(time() - $time) ) < 86400 ) { 389 389 if ( ( 'future' == $page->post_status) ) -
opt/www/eclipsework/WPDev/wp-includes/functions.php
5 5 $m = $mysqlstring; 6 6 if ( empty( $m ) ) 7 7 return false; 8 9 if( 'G' == $dateformatstring ) { 10 return gmmktime( 11 (int) substr( $m, 11, 2 ), (int) substr( $m, 14, 2 ), (int) substr( $m, 17, 2 ), 12 (int) substr( $m, 5, 2 ), (int) substr( $m, 8, 2 ), (int) substr( $m, 0, 4 ) 13 ); 14 } 15 8 16 $i = mktime( 9 17 (int) substr( $m, 11, 2 ), (int) substr( $m, 14, 2 ), (int) substr( $m, 17, 2 ), 10 18 (int) substr( $m, 5, 2 ), (int) substr( $m, 8, 2 ), (int) substr( $m, 0, 4 )