Hi,<br><br>This has clearly been discussed before: <a href="http://comox.textdrive.com/pipermail/wp-xmlrpc/2008-April/000188.html">http://comox.textdrive.com/pipermail/wp-xmlrpc/2008-April/000188.html</a><br><br>If dateCreated is of PHP type DateTime, posting will succeed, when it's a string in ISO8601 format it fails.<br>
However, no matter what date the DateTime object contains, it doesn't seem to pass the timestamp.<br><br>E.g.<br><br><div style="margin-left: 40px;">$title = htmlentities($title,ENT_NOQUOTES,$encoding);<br>$keywords = htmlentities($keywords,ENT_NOQUOTES,$encoding);<br>
$datetime = new DateTime('2008-08-03 14:52:10');<br>echo "Formatted ISO: " . $datetime->format(DATE_ISO8601) . "<br />\n";<br>var_dump($datetime);<br> <br>$content = array(<br></div>
<div style="margin-left: 80px;">'title'=>$title,<br>'description'=>$body, <br>'dateCreated' => $datetime,<br>'mt_allow_comments'=>1,<br>'mt_allow_pings'=>1,<br>'post_type'=>'post',<br>
'mt_keywords'=>$keywords,<br>'categories'=>array($category));<br><br></div>Will post, but date will be current time.<br><br>Any ideas?<br><br>Cheers,<br><br>AJ<br><br><br>