Subscribe to
Posts
Comments
NSLog(); Header Image

WordPress 2.2 Reporting Incorrect Time

Since updating to WordPress 2.2, times reported back to my blog editor (be it ecto or MarsEdit) are incorrect. They're the UTC time and not the adjusted time (-4 for me currently). Since ecto and, I presume, other blog editors pass the time along as part of the XMLRPC statement when they're posted, subsequent editing of a blog entry incorrectly "adjusts" the time. The time(s) listed in the WP-Admin interface are correct.

I've modified almost no core files on this blog - just formatting.php to "fix" broken image uploading - so I have to assume these are WordPress 2.2 bugs. I don't have the time right now to look into solving them, but if someone knows how to do so, please let me know. See extended entry for more…

This is what's returned from the blog:

<member>
<name>dateCreated</name>
<value><dateTime.iso8601>20070522T13:19:14</dateTime.iso8601></value>
</member>

This appears to be a bug in xmlrpc.php and may be related to this issue.

Update: A solution (band-aid) is posted in the bug I filed. Just add "\Z" to the time formatting strings in xmlrpc.php.

Other Bug: I removed mention of another bug I'd previously mentioned here. That link is to its Trac ticket. It's since been resolved by changing line 1153 to $post_author = $postdata["post_author"];.

5 Responses to "WordPress 2.2 Reporting Incorrect Time"

  1. Thank you for reporting Ticket #4314 2.2 Reports Incorrect/Malformed Time . I think you are correct as to the origin of this issue as described in that ticket.

    I will talk to Joseph Scott who did this related work for XML-RPC in WordPress 2.2 and WordPress.com .

    I am near certain that the issue is not the '-', because that topic previously came up, and both formats are accepted in this context.

  2. Lloyd Budd said on May 22, 2007:

    Thank you for reporting Ticket #4314 2.2 Reports Incorrect/Malformed Time.

    I've edited the entry above to more properly link to that entry. My blog post was a bit of a "fact-gathering" post, not a bug-reporting post. As you know, Lloyd, I'm happy to post bugs after I gather more facts than "this doesn't seem to work."

  3. I've updated the ticket with the simple patch we talked about. WordPress.com blogs are already fixed, and I'm working on getting it into the WordPress.org code.

  4. Got both fixes into WP core (in trunk and 2.2 branches). Fixes will appear in 2.2.1 and 2.3. Good work, team. 🙂

  5. What is it with WordPress? I remember there was a similar bug not long ago, maybe 2.1 or something, which was also fixed in a subsequent point release. Guess I'll just wait for 2.2.1 🙂 Not a major issue anyways. Thanks for the heads-up though!


Trackback URI | Comments RSS

Leave a Reply

Please abide by the comment policy. Valid HTML includes: <blockquote><p>, <em>, <strong>, <ul>, <ol>, and <a href>. Please use the "Quote Me" functionality to quote comments.