[wp-xmlrpc] Using date_created_gmt in a Java application??

Tom Hoag tomhoag at gmail.com
Tue Sep 23 13:54:32 GMT 2008


Turns out the version of WP that I'm using as a test blog has an older
version of xmlrpc.php
that does not have date_created_gmt (only looks for dateCreated in the
struct).  Hence, using
the date_created_gmt field is yielding exactly the result that I was seeing:
use current date.
(I was referencing a local copy of xmlrpc.php that I must have grabbed from
a more recent
version of WP)

So now I'm back to the dateCreated situation -- dateCreated interprets the
passed in date
as GMT.  Which, as it turns out, is exactly what the spec specifies (
http://www.xmlrpc.com/spec)

<dateTime.iso8601>    date/time    19980717T14:08:55

Note that there is not TZ (or millisecond) component to the dateTime.iso8601
-- So I'm supposing
that my method of offsetting my desired postdate by the diff between the
local TZ and GMT is
the only way to get around this . . .

Also, I started going down the path to dump the XML being sent to the
server, but couldn't find
anything.  Is there a mechanism on WP to log the XML somewhere??  Would be
handy to know
for future debugging.

thanks

tom




> Message: 3
> Date: Mon, 22 Sep 2008 12:30:48 -0600
> From: Joseph Scott <joseph at randomnetworks.com>
> Subject: Re: [wp-xmlrpc] Using date_created_gmt in a Java
>        application??
>
>
>
> On Sep 22, 2008, at 9:40 AM, Tom Hoag wrote:
>
> >
> > I'm writing a Java app using the redstone xmlrpc library and having
> > a problem with both postCreated and date_created_gmt
> >
> > Whenever I set the postCreated field, WP interprets/modifies the
> > timezone to GMT. For the time being, I've kludged the date (adding
> > the difference between the local TZ and GMT) so that WP gets the
> > post date right.  This is ugly and I'd rather not do this . . .
> >
> > It's been suggested that I use the date_created_gmt field, but I've
> > had zero luck getting this to work.  It seems that WP cannot parse
> > the passed in java.util.Date as a valid date and subsequently
> > defaults to the current date.
> >
> > Any thoughts on whats going on here?  Anyone care to share some
> > working code?
>
>
>
> Can you post the raw XML when using date_created_gmt?  I'm afraid my
> Java skills are pretty limited, perhaps someone else will have some
> suggestions on that side of things.
>
> --
> Joseph Scott
> joseph at randomnetworks.com
> http://joseph.randomnetworks.com/
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://comox.textdrive.com/pipermail/wp-xmlrpc/attachments/20080923/167c2247/attachment.htm


More information about the wp-xmlrpc mailing list