[wp-hackers] Problems setting publication date with newPost and perl WordPress::XMLRPC

Otto otto at ottodestruct.com
Thu Feb 2 17:55:12 UTC 2012


Not sure why you're using pubDate in that struct. I think you should
be using something more like this:

dateCreated => '20080121T12:38:30',
date_created_gmt => '20080121T20:38:30',

-Otto



On Thu, Feb 2, 2012 at 9:44 AM, Bryan Wright
<bkw1a at ayesha.phys.virginia.edu> wrote:
> Hi folks,
>
>     I'm trying to use Leo Charre's WordPress::XMLRPC perl module to create new
> posts that have publication dates in the past.  (I'm going to import some old
> posts.)  Everything works fine except setting the publication date.  No matter
> what I do, the publication date is always now, instead of the date I specify.
> Here's an excerpt from the code:
>
> use WordPress::XMLRPC
>
> my $postid = $wprpc->newPost({
>    title       => $title,
>    description => $body,
>    pubDate     => $gmtisodate,
>    categories  => ["News"]
>                             });
>
> I've tried several different date formats, and they're all accepted without
> complaint, but the results are the same.
>
>     Any advice would be appreciated.
>
>                                               Thanks,
>                                               Bryan
>
>
> _______________________________________________
> wp-hackers mailing list
> wp-hackers at lists.automattic.com
> http://lists.automattic.com/mailman/listinfo/wp-hackers


More information about the wp-hackers mailing list