views:

53

answers:

1

I'm reaching the end of my tether trying to schedule a new post through Wordpress' XMLRPC interface from Ruby.

I am creating a new Time object and filling it with my date and time, I then call .xmlschema to get a datetime string in the correct format for Wordpress' XMLRPC interface.

Unfortunately, Wordpress treats this as a string, and I can't work out how to get the xmlrpc.php to treat it as an object; really can't get my head around it.

Calling the metaWeblog.newPost method, and sending:

{:title => 'Foo', :post_status => 'publish', :dateCreated => my_date.xmlschema} 

to Wordpress.

Anyone been through this before?

A: 

Can you check what you are actually sending (the post data)? The date should be encapsulated in <dateTime.iso8601></dateTime.iso8601>, not in <string></string>. The WordPress Trac has a similar report.

Jan Fabry
Jan - interestingly I just changed my_date.xmlschema to my_date (so it is a ruby datetime data type), and it just worked fine...A bit embarrassing if this is the cause of all my problems.
kez