Wordpress/tests
James Nylen 4414e3c20a REST API: Shim `post_date_gmt` for drafts / empty dates in the REST API.
Internally, WordPress uses a special `post_date_gmt` value of `0000-00-00 00:00:00` to indicate that a draft's date is "floating" and should be updated whenever the post is saved.  This makes it much more difficult for API clients to know the correct date of a draft post.

This commit provides a best guess at a `date_gmt` value for draft posts in this situation using the `date` field and the site's current timezone offset.

Props joehoyle.
Fixes #38883.


git-svn-id: https://develop.svn.wordpress.org/trunk@40108 602fd350-edb4-49c9-b593-d223f7449a82
2017-02-24 18:14:21 +00:00
..
phpunit REST API: Shim `post_date_gmt` for drafts / empty dates in the REST API. 2017-02-24 18:14:21 +00:00
qunit REST API: Include the `status` property in `view` context responses from the Posts endpoints. 2017-02-19 04:31:12 +00:00