now commenting in localtime+gmt

git-svn-id: http://svn.automattic.com/wordpress/trunk@997 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
michelvaldrighi 2004-03-25 01:56:02 +00:00
parent 5abfd66c93
commit caeaf47bbb

View File

@ -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()');