Make WordPress Core


Ignore:
Timestamp:
05/17/2004 04:40:23 AM (21 years ago)
Author:
rboren
Message:

Import date fixes from 2fargon.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-admin/import-mt.php

    r1288 r1292  
    264264                $post_date = strtotime($value);
    265265                $post_date = date('Y-m-d H:i:s', $post_date);
     266                $post_date_gmt = get_gmt_from_date("$post_date");
    266267                break;
    267268            default:
     
    277278        $post_author = checkauthor($post_author);//just so that if a post already exists, new users are not created by checkauthor
    278279        $wpdb->query("INSERT INTO $tableposts (
    279             post_author, post_date, post_content, post_title, post_excerpt,  post_status, comment_status, ping_status, post_name)
     280            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)
    280281            VALUES
    281             ('$post_author', '$post_date', '$post_content', '$post_title', '$excerpt', '$post_status', '$comment_status', '$ping_status', '$post_name')");
     282            ('$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')");
    282283        $post_id = $wpdb->get_var("SELECT ID FROM $tableposts WHERE post_title = '$post_title' AND post_date = '$post_date'");
    283284        if (0 != count($post_categories)) {
Note: See TracChangeset for help on using the changeset viewer.