[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 14:04:23 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:
--------------------------------------+------------------------------
Comment (by danielbachhuber):
Replying to [comment:9 jnylen0]:
> I don't know what would be a good way to make that request, but "set
this other field unrelated to the task at hand to a special magic value"
is not the sane way to do it.
>
> I know this is the way WP currently works. I think we should work
around it in the API because storing dates in UTC is the only way to write
provably correct datetime-handling code, and losing the ability to do that
isn't worth it.
How do APIs for other publishing platforms handle this particular use
case?
--
Ticket URL: <https://core.trac.wordpress.org/ticket/38883#comment:10>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list