diff --git a/wp-admin/edit-attachment-rows.php b/wp-admin/edit-attachment-rows.php index e418f5e3b8..cd0c9ab458 100644 --- a/wp-admin/edit-attachment-rows.php +++ b/wp-admin/edit-attachment-rows.php @@ -65,7 +65,7 @@ foreach($posts_columns as $column_name=>$column_display_name) { } else { $t_time = get_the_time(__('Y/m/d g:i:s A')); $m_time = $post->post_date; - $time = get_post_time(); + $time = get_post_time( 'G', true ); if ( ( abs($t_diff = time() - $time) ) < 86400 ) { if ( $t_diff < 0 ) $h_time = sprintf( __('%s from now'), human_time_diff( $time ) ); diff --git a/wp-admin/edit-post-rows.php b/wp-admin/edit-post-rows.php index 3de1ff66f6..20c4d636c9 100644 --- a/wp-admin/edit-post-rows.php +++ b/wp-admin/edit-post-rows.php @@ -44,11 +44,11 @@ foreach($posts_columns as $column_name=>$column_display_name) { if ( 'modified' == $column_name ) { $t_time = get_the_modified_time(__('Y/m/d g:i:s A')); $m_time = $post->post_modified; - $time = get_post_modified_time(); + $time = get_post_modified_time('G', true); } else { $t_time = get_the_time(__('Y/m/d g:i:s A')); $m_time = $post->post_date; - $time = get_post_time(); + $time = get_post_time('G', true); } if ( ( abs(time() - $time) ) < 86400 ) { if ( ( 'future' == $post->post_status) ) diff --git a/wp-admin/includes/template.php b/wp-admin/includes/template.php index e00ca0f867..955b36a2d5 100644 --- a/wp-admin/includes/template.php +++ b/wp-admin/includes/template.php @@ -379,11 +379,11 @@ foreach ($posts_columns as $column_name=>$column_display_name) { if ( 'modified' == $column_name ) { $t_time = get_the_modified_time(__('Y/m/d g:i:s A')); $m_time = $page->post_modified; - $time = get_post_modified_time(); + $time = get_post_modified_time('G', true); } else { $t_time = get_the_time(__('Y/m/d g:i:s A')); $m_time = $page->post_date; - $time = get_post_time(); + $time = get_post_time('G', true); } if ( ( abs(time() - $time) ) < 86400 ) { if ( ( 'future' == $page->post_status) ) diff --git a/wp-includes/functions.php b/wp-includes/functions.php index 7987d297ef..1e278b0060 100644 --- a/wp-includes/functions.php +++ b/wp-includes/functions.php @@ -5,6 +5,14 @@ function mysql2date( $dateformatstring, $mysqlstring, $translate = true ) { $m = $mysqlstring; if ( empty( $m ) ) return false; + + if( 'G' == $dateformatstring ) { + return gmmktime( + (int) substr( $m, 11, 2 ), (int) substr( $m, 14, 2 ), (int) substr( $m, 17, 2 ), + (int) substr( $m, 5, 2 ), (int) substr( $m, 8, 2 ), (int) substr( $m, 0, 4 ) + ); + } + $i = mktime( (int) substr( $m, 11, 2 ), (int) substr( $m, 14, 2 ), (int) substr( $m, 17, 2 ), (int) substr( $m, 5, 2 ), (int) substr( $m, 8, 2 ), (int) substr( $m, 0, 4 )