[wp-trac] [WordPress Trac] #38883: Shim post_date_gmt for drafts / empty dates in the REST API
WordPress Trac
noreply at wordpress.org
Mon Nov 21 11:30:42 UTC 2016
#38883: Shim post_date_gmt for drafts / empty dates in the REST API
--------------------------------------+------------------------------
Reporter: joehoyle | Owner: rmccue
Type: defect (bug) | Status: reviewing
Priority: normal | Milestone: Awaiting Review
Component: REST API | Version:
Severity: normal | Resolution:
Keywords: has-unit-tests has-patch | Focuses:
--------------------------------------+------------------------------
Changes (by jnylen0):
* keywords: needs-patch has-unit-tests => has-unit-tests has-patch
Comment:
> The expectation is that the date remains a falsy value if it's meant to
be set to the current time when the post is published.
This is a silly expectation. The API should both provide and accept a
UTC/GMT date.
Two comments on [attachment:38883.diff]:
- The comment in the second block should say `For drafts, modified_gmt
will not be set,` instead of `date_gmt`.
- Based on the discussion above, updating `post_date_gmt` for a draft will
probably break things. If we make this change, we need to make sure that
after sending a draft on a "round-trip" through the API it still has null
dates where needed.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/38883#comment:7>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list