From 54139eb9dc481cfbc7447e496e0514385ac38df0 Mon Sep 17 00:00:00 2001 From: Matt Mullenweg Date: Tue, 24 Feb 2004 23:49:51 +0000 Subject: [PATCH] Temporary fix for next_post with GMT. git-svn-id: https://develop.svn.wordpress.org/trunk@930 602fd350-edb4-49c9-b593-d223f7449a82 --- wp-includes/template-functions-post.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/wp-includes/template-functions-post.php b/wp-includes/template-functions-post.php index 52f477ee6e..603973f032 100644 --- a/wp-includes/template-functions-post.php +++ b/wp-includes/template-functions-post.php @@ -321,11 +321,11 @@ function next_post($format='%', $next='next post: ', $title='yes', $in_same_cat= } } - $now = date('Y-m-d H:i:s',(time() + ($time_difference * 3600))); + $now = current_time('mysql'); $limitnext--; - $nextpost = @$wpdb->get_row("SELECT ID,post_title FROM $tableposts WHERE post_date > '$current_post_date' AND post_date < '$now' AND post_status = 'publish' $sqlcat $sql_exclude_cats ORDER BY post_date ASC LIMIT $limitnext,1"); + $nextpost = @$wpdb->get_row("SELECT ID,post_title FROM $tableposts 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"); if ($nextpost) { $string = ''.$next; if ($title=='yes') {