官方发布的wordpress 2.6.3 火车发布接口 时区问题
在官方发布的wordpress 2.6.3 火车发布接口文件sql.php中有如下代码:if($title=='[标签:标题]'&&$content=='[标签:内容]'&&$cid=='[分类id]'){die('标题或内容或分类id为空');}
if($tag=='[标签:SY_tag]'){$tag='';}
$showtime=date("Y-m-d H:i:s");
$tm=time();
$sql="INSERT INTO `".$table_prefix."posts` ( `post_author`, `post_date`, `post_date_gmt`, `post_content`, `post_title`, `post_category`, `post_excerpt`, `post_status`, `comment_status`, `ping_status`, `post_password`, `post_name`, `to_ping`, `pinged`, `post_modified`, `post_modified_gmt`, `post_content_filtered`, `post_parent`, `guid`, `menu_order`, `post_type`, `post_mime_type`, `comment_count`) VALUES (1, '$showtime', '$showtime', '$content', '$title', '$cid', '$summary', 'publish', 'open', 'open', '', '', '', '', '$showtime', '$showtime', '', 0, '', 0, 'post', '', 0)";
$query=$DB->query($sql
问题如下,默认得到时间是GMT标准时间,如何使post_date的到中国时区的时间,而post_date_gmt得到GMT标准时间。 你参考下这个
http://hi.baidu.com/blvm/blog/item/1965c4a1ca93f08d4710648a.html
页:
[1]