WordPress/wp-includes/rest-api
James Nylen b6ce4e2830 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.

Fixes #39256.

Built from https://develop.svn.wordpress.org/trunk@40101


git-svn-id: http://core.svn.wordpress.org/trunk@40038 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-02-21 18:18:45 +00:00
..
endpoints REST API: Fix multiple issues with setting dates of posts and comments. 2017-02-21 18:18:45 +00:00
fields REST API: Return a `WP_Error` if `meta` property is not an array. 2016-12-02 21:56:42 +00:00
class-wp-rest-request.php REST API: Do not error on empty JSON body 2016-12-13 03:34:41 +00:00
class-wp-rest-response.php DOCS: Replace HTTP links with HTTPS. 2016-06-10 04:50:33 +00:00
class-wp-rest-server.php REST API: After [38947], improve the wording of the message to clarify that `rest_authentication_errors` is a filter. 2017-02-01 21:32:47 +00:00