From 081e7089a8197d8b0b8d1e89951165c70875fb54 Mon Sep 17 00:00:00 2001 From: ryan 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: http://svn.automattic.com/wordpress/trunk@6793 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- 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')); + } } ?>