Title: reading draft dates with metaWeblog.getRecentPosts via XMLRPC on Java
Last modified: August 19, 2016

---

# reading draft dates with metaWeblog.getRecentPosts via XMLRPC on Java

 *  [bradleywagnergmailcom](https://wordpress.org/support/users/bradleywagnergmailcom/)
 * (@bradleywagnergmailcom)
 * [16 years, 9 months ago](https://wordpress.org/support/topic/reading-draft-dates-with-metawebloggetrecentposts-via-xmlrpc-on-java/)
 * I’m trying to execute metaWeblog.getRecentPosts against a WP 2.8.4 instance with
   draft posts. I’m getting an error when attempting to get recent posts using Apache’s
   XMLRPC library for Java.
 * `org.apache.xmlrpc.client.XmlRpcClientException: Failed to parse server's response:
   Failed to parse date value -0001113TT0::0::00 at position 0`
 *     ```
       Caused by: java.text.ParseException: Format.parseObject(String) failed
       	at org.apache.xmlrpc.parser.DateParser.setResult(DateParser.java:55)
       	at org.apache.xmlrpc.parser.AtomicParser.endElement(AtomicParser.java:59)
       ```
   
 * This problem does not exist in WordPress 2.8. I’ve tracked it down to this difference
   in xmlrpc.php between 2.8 and 2.8.4 related to handling draft dates:
 *     ```
       // 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 );
       }
       ```
   
 * the post_date_gmt column for drafts of new posts is 0000-00-00 00:00:00

The topic ‘reading draft dates with metaWeblog.getRecentPosts via XMLRPC on Java’
is closed to new replies.

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 0 replies
 * 1 participant
 * Last reply from: [bradleywagnergmailcom](https://wordpress.org/support/users/bradleywagnergmailcom/)
 * Last activity: [16 years, 9 months ago](https://wordpress.org/support/topic/reading-draft-dates-with-metawebloggetrecentposts-via-xmlrpc-on-java/)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
