[wp-trac] [WordPress Trac] #39256: REST API: Multiple issues with setting dates of posts

WordPress Trac noreply at wordpress.org
Fri Feb 24 21:58:09 UTC 2017


#39256: REST API: Multiple issues with setting dates of posts
--------------------------------------------------+----------------------
 Reporter:  jnylen0                               |       Owner:  jnylen0
     Type:  defect (bug)                          |      Status:  closed
 Priority:  normal                                |   Milestone:  4.7.3
Component:  REST API                              |     Version:  4.7
 Severity:  major                                 |  Resolution:  fixed
 Keywords:  has-unit-tests has-patch fixed-major  |     Focuses:
--------------------------------------------------+----------------------
Changes (by SergeyBiryukov):

 * status:  reopened => closed
 * resolution:   => fixed


Comment:

 In [changeset:"40114"]:
 {{{
 #!CommitTicketReference repository="" revision="40114"
 REST API: Fix multiple issues with setting dates of posts and comments.

 This commit modifies the `rest_get_date_with_gmt` function to correctly
 parse local and UTC timestamps with or without timezone information.

 It also ensures that the REST API can edit the dates of draft posts by
 setting the `edit_date` flag to `wp_update_post`.

 Overall this commit ensures that post and comment dates can be set and
 updated as expected.

 Props jnylen0.
 Merges [40101] to the 4.7 branch.
 Fixes #39256.
 }}}

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


More information about the wp-trac mailing list