diff --git a/wp-commentsrss2.php b/wp-commentsrss2.php index 0f3be0cac..ece77df33 100644 --- a/wp-commentsrss2.php +++ b/wp-commentsrss2.php @@ -30,7 +30,7 @@ if (have_posts()) : get_results("SELECT comment_ID, comment_author, comment_author_email, - comment_author_url, comment_date, comment_content, comment_post_ID, + comment_author_url, comment_date, comment_date_gmt, comment_content, comment_post_ID, $wpdb->posts.ID, $wpdb->posts.post_password FROM $wpdb->comments LEFT JOIN $wpdb->posts ON comment_post_id = id WHERE comment_post_ID = '$id' AND $wpdb->comments.comment_approved = '1' AND ($wpdb->posts.post_status = 'publish' OR $wpdb->posts.post_status = 'static') @@ -38,7 +38,7 @@ if (have_posts()) : ORDER BY comment_date DESC LIMIT " . get_settings('posts_per_rss') ); } else { // if no post id passed in, we'll just ue the last 10 comments. $comments = $wpdb->get_results("SELECT comment_ID, comment_author, comment_author_email, - comment_author_url, comment_date, comment_content, comment_post_ID, + comment_author_url, comment_date, comment_date_gmt, comment_content, comment_post_ID, $wpdb->posts.ID, $wpdb->posts.post_password FROM $wpdb->comments LEFT JOIN $wpdb->posts ON comment_post_id = id WHERE ($wpdb->posts.post_status = 'publish' OR $wpdb->posts.post_status = 'static') AND $wpdb->comments.comment_approved = '1' AND post_date < '".date("Y-m-d H:i:s")."' @@ -51,7 +51,7 @@ if (have_posts()) : by: <?php comment_author_rss() ?> - + post_password) && $_COOKIE['wp-postpass'] != $comment->post_password) { diff --git a/wp-includes/comment-functions.php b/wp-includes/comment-functions.php index fb94031e3..c5d02717f 100644 --- a/wp-includes/comment-functions.php +++ b/wp-includes/comment-functions.php @@ -288,12 +288,13 @@ function comment_date( $d = '' ) { echo get_comment_date( $d ); } -function get_comment_time( $d = '' ) { +function get_comment_time( $d = '', $gmt = false ) { global $comment; + $comment_date = $gmt? $comment->comment_date_gmt : $comment->comment_date; if ( '' == $d ) - $date = mysql2date(get_settings('time_format'), $comment->comment_date); + $date = mysql2date(get_settings('time_format'), $comment_date); else - $date = mysql2date($d, $comment->comment_date); + $date = mysql2date($d, $comment_date); return apply_filters('get_comment_time', $date); } @@ -670,4 +671,4 @@ function check_comment($author, $email, $url, $comment, $user_ip, $user_agent, $ return true; } -?> \ No newline at end of file +?>