From fedbb2dce57943ad0a41abc95dbe66f0f05fec76 Mon Sep 17 00:00:00 2001 From: Ryan Boren Date: Mon, 11 Feb 2008 21:52:50 +0000 Subject: [PATCH] Fix human readable time offset for future posts. Props ffemtcj. fixes #5817 git-svn-id: https://develop.svn.wordpress.org/trunk@6793 602fd350-edb4-49c9-b593-d223f7449a82 --- wp-admin/edit-post-rows.php | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/wp-admin/edit-post-rows.php b/wp-admin/edit-post-rows.php index e8a1316769..807335f68a 100644 --- a/wp-admin/edit-post-rows.php +++ b/wp-admin/edit-post-rows.php @@ -47,10 +47,14 @@ foreach($posts_columns as $column_name=>$column_display_name) { if ( '0000-00-00 00:00:00' ==$post->post_date ) { _e('Unpublished'); } else { - if ( ( time() - get_post_time() ) < 86400 ) - echo sprintf( __('%s ago'), human_time_diff( get_post_time() ) ); - else + if ( ( abs(time() - get_post_time()) ) < 86400 ) { + if ( ( 'future' == $post->post_status) ) + echo sprintf( __('%s from now'), human_time_diff( get_post_time() ) ); + else + echo sprintf( __('%s ago'), human_time_diff( get_post_time() ) ); + } else { the_time(__('Y/m/d')); + } } ?>