XPressME Integration Kit

Trac


Ignore:
Timestamp:
Jun 8, 2010, 9:37:06 AM (14 years ago)
Author:
toemon
Message:

D3Forumコメント統合一括インポート・エクスポート時の時間ずれバグ修正 Fixes#350 (thx bichico)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/xpressme_integration_kit/wp-content/plugins/xpressme/include/d3forum_comment_synchro.php

    r597 r616  
    459459        } 
    460460        $comment_author_IP = "'" . $d3f_row->poster_ip . "'"; 
    461         $comment_date = "'" . date('Y-m-d H:i:s' , $d3f_row->post_time) . "'"; 
     461        $gmt_offset = get_option('gmt_offset'); 
     462        $local_timestamp = $d3f_row->post_time + ($gmt_offset * 3600); 
     463        $comment_date = "'" . date('Y-m-d H:i:s' , $local_timestamp) . "'"; 
    462464        $comment_content = "'" . addSlashes($d3f_row->post_text) . "'"; 
    463465        $comment_approved = "'" . $d3f_row->approval . "'"; 
     
    543545 
    544546        $sql  = "SELECT $wp_comments.comment_ID,$wp_comments.comment_post_ID, "; 
    545         $sql .=         "$wp_comments.comment_author, $wp_comments.comment_author_email,  $wp_comments.comment_date, "; 
     547        $sql .=         "$wp_comments.comment_author, $wp_comments.comment_author_email,  $wp_comments.comment_date, $wp_comments.comment_date_gmt, "; 
    546548        $sql .=         "$wp_comments.comment_author_url, $wp_comments.comment_author_IP, "; 
    547549        $sql .=         "$wp_comments.comment_content, $wp_comments.comment_karma, "; 
     
    561563        $topic_external_link_id = $row->comment_post_ID; //There is information on WP post_ID in topic_external_link_id of D3Forum 
    562564        $topic_title = 'Re.' . addSlashes($row->post_title); 
    563         $post_time = strtotime($row->comment_date);             // or   $row2['comment_date_gmt'] 
    564         $modified_time = strtotime($row->comment_date); // or   $row2['comment_date_gmt'] 
     565        $post_time = strtotime($row->comment_date_gmt);  
     566        $modified_time = strtotime($row->comment_date_gmt); 
    565567        require_once (get_xpress_dir_path() . 'include/general_functions.php'); 
    566568        if (empty($row->user_id)){ 
Note: See TracChangeset for help on using the changeset viewer.