Title: post_date question
Last modified: August 19, 2016

---

# post_date question

 *  [zeekapitein](https://wordpress.org/support/users/zeekapitein/)
 * (@zeekapitein)
 * [15 years, 8 months ago](https://wordpress.org/support/topic/post_date-question/)
 * Hi
 * I’m using xmlrpc to post remotely to my blog. Does somebody know how to add a
   custum date when i post it to my blog?(So not the date of now)
 * ‘post_date’=>$pubdate, but i can’t make the it to work. I understand you need
   to use the dateTime.iso8601 format… But no luck… So how set the date of a worpdresspost(
   remotely).
 * I hope you understand my question 🙂
 * Thnx for your help

Viewing 5 replies - 1 through 5 (of 5 total)

 *  [Joseph Scott](https://wordpress.org/support/users/josephscott/)
 * (@josephscott)
 * [15 years, 8 months ago](https://wordpress.org/support/topic/post_date-question/#post-1692936)
 * I recommend using the date_created_gmt field. This will set the date/time for
   the post and is always GMT.
 *  Thread Starter [zeekapitein](https://wordpress.org/support/users/zeekapitein/)
 * (@zeekapitein)
 * [15 years, 8 months ago](https://wordpress.org/support/topic/post_date-question/#post-1692938)
 * Hi thnx Joseph!
 * But when i use :
 * $pubdate =”2010-07-28 19:36:04″;
 * then other code of my page :
 *  $content = array(
    ‘title’=>$title, ‘description’=>$body, **‘date_created_gmt’
   =>$pubdate,**
 *  );
 * It still doens’t work… Is it the wrong format in my variable ? I Now get the 
   error :
    -32700 : parse error. not well formed
 * Thnx for your help!
 *  [Joseph Scott](https://wordpress.org/support/users/josephscott/)
 * (@josephscott)
 * [15 years, 8 months ago](https://wordpress.org/support/topic/post_date-question/#post-1692972)
 * Sounds like you didn’t use dateTime.iso8601 format. Also take a look at the raw
   XML, often a parse error like that will stand out with a visual inspection.
 *  Thread Starter [zeekapitein](https://wordpress.org/support/users/zeekapitein/)
 * (@zeekapitein)
 * [15 years, 8 months ago](https://wordpress.org/support/topic/post_date-question/#post-1693015)
 * Thnx I found a working code :p
 * $pubdate =strtotime(‘2009-08-102009-08-31 12:17:25’);
 * But when i use with :
 * ‘date_created’=>$pubdate,
    ‘post_date’=>$pubdate,
 * ‘post_modified’=>$pubdate,
    ‘post_modified_gmt’=>$pubdate,
 * I go to my post and the timestamp automaticly changed the date to the current
   date…
 * When i go to my database the date rows (date_created,…) are different from the‘
   published on’ date in my blogpost…. So how do set the published date…
 * Thnx for the help! Hope you understan my bad english :p
 * greetings
 *  [Joseph Scott](https://wordpress.org/support/users/josephscott/)
 * (@josephscott)
 * [15 years, 8 months ago](https://wordpress.org/support/topic/post_date-question/#post-1693061)
 * Stick with the date_created_gmt field.

Viewing 5 replies - 1 through 5 (of 5 total)

The topic ‘post_date question’ is closed to new replies.

## Tags

 * [date](https://wordpress.org/support/topic-tag/date/)
 * [post](https://wordpress.org/support/topic-tag/post/)
 * [post_date](https://wordpress.org/support/topic-tag/post_date/)
 * [Remote](https://wordpress.org/support/topic-tag/remote/)
 * [xmlrpc](https://wordpress.org/support/topic-tag/xmlrpc/)

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 5 replies
 * 2 participants
 * Last reply from: [Joseph Scott](https://wordpress.org/support/users/josephscott/)
 * Last activity: [15 years, 8 months ago](https://wordpress.org/support/topic/post_date-question/#post-1693061)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
