[wp-trac] [WordPress Trac] #35053: XML-RPC when post with date_created_gmt, its post_date will gmt date not local date
WordPress Trac
noreply at wordpress.org
Mon Dec 14 16:38:52 UTC 2015
#35053: XML-RPC when post with date_created_gmt, its post_date will gmt date not
local date
--------------------------------------+--------------------
Reporter: hnle | Owner:
Type: defect (bug) | Status: new
Priority: normal | Milestone: 4.4.1
Component: XML-RPC | Version: 4.4
Severity: normal | Resolution:
Keywords: has-patch has-unit-tests | Focuses:
--------------------------------------+--------------------
Comment (by redsweater):
The same commit [34681] also changed the behavior of dates specified with
the "date_created" key, such that the date is set on the server to the
dateCreated value without regard for its time zone information. For
example, a post that is edited and set to a date:
{{{
<dateCreated>
<value><dateTime.iso8601>20151215T15:19:49Z</dateTime.iso8601></value>
</dateCreated>
}}}
Comes back from the server as the same date and time with the Z stripped:
{{{
<member><name>post_date</name><value><dateTime.iso8601>20151215T15:19:49</dateTime.iso8601></value></member>
}}}
This has the effect of causing posts to be scheduled or set as having been
published at a time that is as many hours off from GMT as the user's local
time zone.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/35053#comment:5>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list