From 25532a1681929b883e94bbdc108f3d20d55ed0d1 Mon Sep 17 00:00:00 2001 From: rboren Date: Mon, 17 May 2004 04:40:23 +0000 Subject: [PATCH] Import date fixes from 2fargon. git-svn-id: http://svn.automattic.com/wordpress/trunk@1292 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-admin/import-mt.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/wp-admin/import-mt.php b/wp-admin/import-mt.php index d466ab73e1..fbfccf7334 100644 --- a/wp-admin/import-mt.php +++ b/wp-admin/import-mt.php @@ -263,6 +263,7 @@ foreach ($posts as $post) { if ('' != trim($post)) { case 'DATE': $post_date = strtotime($value); $post_date = date('Y-m-d H:i:s', $post_date); + $post_date_gmt = get_gmt_from_date("$post_date"); break; default: // echo "\n$key: $value"; @@ -276,9 +277,9 @@ foreach ($posts as $post) { if ('' != trim($post)) { } else { $post_author = checkauthor($post_author);//just so that if a post already exists, new users are not created by checkauthor $wpdb->query("INSERT INTO $tableposts ( - post_author, post_date, post_content, post_title, post_excerpt, post_status, comment_status, ping_status, post_name) + post_author, post_date, post_date_gmt, post_content, post_title, post_excerpt, post_status, comment_status, ping_status, post_name, post_modified, post_modified_gmt) VALUES - ('$post_author', '$post_date', '$post_content', '$post_title', '$excerpt', '$post_status', '$comment_status', '$ping_status', '$post_name')"); + ('$post_author', '$post_date', '$post_date_gmt', '$post_content', '$post_title', '$excerpt', '$post_status', '$comment_status', '$ping_status', '$post_name','$post_date', '$post_date_gmt')"); $post_id = $wpdb->get_var("SELECT ID FROM $tableposts WHERE post_title = '$post_title' AND post_date = '$post_date'"); if (0 != count($post_categories)) { foreach ($post_categories as $post_category) {