mirror of
https://github.com/WordPress/WordPress.git
synced 2024-12-22 17:18:32 +01:00
Return correct date in date_created_gmt field. Props josephscott. fixes #10244 for trunk
git-svn-id: http://svn.automattic.com/wordpress/trunk@11624 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
090bee02ab
commit
8d00b22c40
@ -2574,6 +2574,13 @@ class wp_xmlrpc_server extends IXR_Server {
|
||||
$post_date = mysql2date('Ymd\TH:i:s', $postdata['post_date'], false);
|
||||
$post_date_gmt = mysql2date('Ymd\TH:i:s', $postdata['post_date_gmt'], false);
|
||||
|
||||
// For drafts use the GMT version of the post date
|
||||
if ( $postdata['post_status'] == 'draft' ) {
|
||||
$post_date_gmt = get_gmt_from_date( mysql2date( 'Y-m-d H:i:s', $postdata['post_date'] ) );
|
||||
$post_date_gmt = preg_replace( '|\-|', '', $post_date_gmt );
|
||||
$post_date_gmt = preg_replace( '| |', 'T', $post_date_gmt );
|
||||
}
|
||||
|
||||
$categories = array();
|
||||
$catids = wp_get_post_categories($post_ID);
|
||||
foreach($catids as $catid)
|
||||
|
Loading…
Reference in New Issue
Block a user