[wp-trac] [WordPress Trac] #38883: Shim post_date_gmt for drafts / empty dates in the REST API

WordPress Trac noreply at wordpress.org
Sun Nov 20 23:32:02 UTC 2016


#38883: Shim post_date_gmt for drafts / empty dates in the REST API
----------------------------------------+------------------------------
 Reporter:  joehoyle                    |       Owner:
     Type:  defect (bug)                |      Status:  new
 Priority:  normal                      |   Milestone:  Awaiting Review
Component:  REST API                    |     Version:
 Severity:  normal                      |  Resolution:
 Keywords:  needs-patch has-unit-tests  |     Focuses:
----------------------------------------+------------------------------

Comment (by danielbachhuber):

 Replying to [comment:4 adamsilverstein]:
 > According to the [https://core.trac.wordpress.org/ticket/5698#comment:14
 original discussion] in #5698 `The empty post_date_gmt is used as the
 marker to indicate that post_date should be updated to the current time
 when saved`. This may be the underlying use we need to address before
 adding actual gmt data to drafts.

 This is exactly why the GMT date is "empty". 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. If the date isn't a falsy value, then
 WordPress use the value presented as the publication date.

--
Ticket URL: <https://core.trac.wordpress.org/ticket/38883#comment:5>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list