From caeaf47bbb520ba16759c2a7b1d926c30f1569b1 Mon Sep 17 00:00:00 2001 From: michelvaldrighi Date: Thu, 25 Mar 2004 01:56:02 +0000 Subject: [PATCH] now commenting in localtime+gmt git-svn-id: http://svn.automattic.com/wordpress/trunk@997 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-comments-post.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) 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()');