[wp-trac] [WordPress Trac] #39953: REST API: Add `date_floating` flag for posts
WordPress Trac
noreply at wordpress.org
Fri Aug 3 04:29:46 UTC 2018
#39953: REST API: Add `date_floating` flag for posts
------------------------------------------+------------------------------
Reporter: jnylen0 | Owner: (none)
Type: enhancement | Status: new
Priority: normal | Milestone: Awaiting Review
Component: REST API | Version: 4.7
Severity: normal | Resolution:
Keywords: needs-patch needs-unit-tests | Focuses: rest-api
------------------------------------------+------------------------------
Comment (by jnylen0):
> I think this should be a `400 Bad Request` because the client is
providing inconsistent information regarding what it wants the API to do.
Again: inconsistency = bad.
I am revising my opinion on this. If `date_gmt` is set and
`date_floating` is true, then that's fine. Internally, we convert
`date_gmt` to site local time, and set `date` accordingly. Then we set
`date_gmt` to the null value.
Not ideal, but I think it's the best we can reasonably do.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/39953#comment:13>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list