diff --git a/wp-comments-post.php b/wp-comments-post.php index 502b00c8ec..14b2f44f28 100644 --- a/wp-comments-post.php +++ b/wp-comments-post.php @@ -46,8 +46,8 @@ if ($comment == 'comment' || $comment == '') { die('Error: please type a comment.'); } - -$now = gmdate('Y-m-d H:i:s'); +$now = current_time('mysql'); +$now_gmt = current_time('mysql', 1); $comment = balanceTags($comment, 1); @@ -85,9 +85,9 @@ if ($ok) { // if there was no comment from this IP in the last 10 seconds } $wpdb->query("INSERT INTO $tablecomments - (comment_post_ID, comment_author, comment_author_email, comment_author_url, comment_author_IP, comment_date, comment_content, comment_approved) + (comment_post_ID, comment_author, comment_author_email, comment_author_url, comment_author_IP, comment_date, comment_date_gmt, comment_content, comment_approved) VALUES - ('$comment_post_ID', '$author', '$email', '$url', '$user_ip', '$now', '$comment', '$approved') + ('$comment_post_ID', '$author', '$email', '$url', '$user_ip', '$now', ,'$now_gmt', '$comment', '$approved') "); $comment_ID = $wpdb->get_var('SELECT last_insert_id()');