From 3a9560b6d627065aaf27948ce2c0da30acd5ceec Mon Sep 17 00:00:00 2001 From: saxmatt Date: Fri, 11 Feb 2005 01:27:10 +0000 Subject: [PATCH] Don't show posts from the future git-svn-id: http://svn.automattic.com/wordpress/trunk@2255 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-includes/template-functions-links.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/wp-includes/template-functions-links.php b/wp-includes/template-functions-links.php index ebd2ea36e5..0662dbf007 100644 --- a/wp-includes/template-functions-links.php +++ b/wp-includes/template-functions-links.php @@ -355,11 +355,11 @@ function next_post($format='%', $next='next post: ', $title='yes', $in_same_cat= } } - $now = current_time('mysql'); + $now = current_time('mysql', 1); $limitnext--; - $nextpost = @$wpdb->get_row("SELECT ID,post_title FROM $wpdb->posts WHERE post_date > '$current_post_date' AND post_date < '$now' AND post_status = 'publish' $sqlcat $sql_exclude_cats AND ID != $post->ID ORDER BY post_date ASC LIMIT $limitnext,1"); + $nextpost = @$wpdb->get_row("SELECT ID,post_title FROM $wpdb->posts WHERE post_date > '$current_post_date' AND post_date_gmt < '$now' AND post_status = 'publish' $sqlcat $sql_exclude_cats AND ID != $post->ID ORDER BY post_date ASC LIMIT $limitnext,1"); if ($nextpost) { $string = ''.$next; if ($title=='yes') {