Merge pull request #27 from nyufeng/patch-1

[Fix]. 草稿文章时间戳为负
This commit is contained in:
joyqi 2021-11-01 17:32:11 +08:00 committed by GitHub
commit 975251b0f8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -176,7 +176,7 @@ class WordpressToTypecho_Action extends Typecho_Widget implements Widget_Interfa
'cid' => $row['ID'],
'title' => $row['post_title'],
'slug' => Typecho_Common::slugName(urldecode($row['post_name']), $row['ID'], 128),
'created' => strtotime($row['post_date_gmt']) + $gmtOffset,
'created' => strtotime($row['post_date_gmt']) + $gmtOffset > 0 ? strtotime($row['post_date_gmt']) + $gmtOffset : 0,
'modified' => strtotime($row['post_modified_gmt']) + $gmtOffset,
'text' => $row['post_content'],
'order' => $row['menu_order'],