When I post an entry via Atompub API using WordPress Atom Publishing Protocol Plugin (also previous wp-app.php), if the entry includes non-GMT time value as published field like this:
<entry xmlns='http://www.w3.org/2005/Atom'><title type='text'>test</title><content type='text/html'>test</content>
<published>2013-08-27T00:00:00+09:00</published>
<app:control xmlns:app='http://www.w3.org/2007/app'><app:draft>no</app:draft></app:control><category term='test'/></entry>
the timezone (+09:00) is not correctly parsed, and same value (GMT time) is stored into post_date
and post_date_gmt
field of wp_posts
.
post_date: 2013-08-27 00:00:00
post_date_gmt: 2013-08-27 00:00:00
Replace
get_publish_time()
function inwp-content/plugins/atom-publishing-protocol/class-wp-atom-server.php
with following code:Notice
Reason
It is because
rfc3339_str2time()
function in the original implementation drops timezone information.