Hi,<br><br>Thanks again for your help, Daniel. Realised the PHP function xmlrpc_encode_request() wasn't returning the datetime member formatted as below, as it can't take apart an IXR Date object or a Date::ISO8601 object apart properly, which I'd not anticipated. Assumed it'd check the IXR Date's asXml() function first, but apparently not. Used SimpleXML to insert the datetime member node as a separate step.<br>
<br>Many thanks,<br><br>AJ<br><br><div class="gmail_quote">On Fri, Oct 30, 2009 at 4:24 PM, Daniel Jalkut <span dir="ltr"><<a href="mailto:jalkut@red-sweater.com">jalkut@red-sweater.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Hi AJ, you should post a copy of what the actual XML cargo looks like that gets sent over the network. Otherwise it's harder for the folks on this list to speculate what might be wrong.<br>
<br>
For your reference, here is an example of a properly formatted dateTime parameter that works:<br>
<br>
<name>dateCreated</name><br>
<value><dateTime.iso8601>20091029T16:23:02Z</dateTime.iso8601></value><br>
</member><br>
<br>
When in doubt about these types of things, a great approach is to find a client that works, and monitor what it sends over the network, to see what you need to mimic.<br>
<br>
Daniel<div><div></div><div class="h5"><br>
<br>
On Oct 30, 2009, at 12:17pm, AJ Cerqueti wrote:<br>
<br>
</div></div><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><div><div></div><div class="h5">
Hi,<br>
<br>
This has clearly been discussed before: <a href="http://comox.textdrive.com/pipermail/wp-xmlrpc/2008-April/000188.html" target="_blank">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>
$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>
'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>
Will post, but date will be current time.<br>
<br>
Any ideas?<br>
<br>
Cheers,<br>
<br>
AJ<br>
<br>
<br></div></div>
_______________________________________________<br>
wp-xmlrpc mailing list<br>
<a href="mailto:wp-xmlrpc@lists.automattic.com" target="_blank">wp-xmlrpc@lists.automattic.com</a><br>
<a href="http://lists.automattic.com/mailman/listinfo/wp-xmlrpc" target="_blank">http://lists.automattic.com/mailman/listinfo/wp-xmlrpc</a><br>
</blockquote>
<br>
_______________________________________________<br>
wp-xmlrpc mailing list<br>
<a href="mailto:wp-xmlrpc@lists.automattic.com" target="_blank">wp-xmlrpc@lists.automattic.com</a><br>
<a href="http://lists.automattic.com/mailman/listinfo/wp-xmlrpc" target="_blank">http://lists.automattic.com/mailman/listinfo/wp-xmlrpc</a><br>
</blockquote></div><br>