WordPress/wp-includes/rest-api
James Nylen 27aa0664df REST API: Add gmt_offset and timezone_string to the base /wp-json response.
The site's current timezone offset is an important piece of information for any REST API client that needs to manipulate dates.  It has not been previously available.

Expose both the `gmt_offset` (the site's current offset from UTC in hours) and `timezone_string` (which also provides information about daylight savings time) via the "site info" endpoint (the base `/wp-json` response).

Also update the `wp-api-generated.js` fixture file with the changes to the default API responses.

Props sagarkbhatt.
Fixes #39854.

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


git-svn-id: http://core.svn.wordpress.org/trunk@40168 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-03-07 05:48:41 +00:00
..
endpoints REST API: Fix behavior of sticky posts filter when no posts are sticky. 2017-02-25 05:03:42 +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: Correctly parse body parameters for DELETE requests. 2017-02-23 20:10:44 +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: Add gmt_offset and timezone_string to the base /wp-json response. 2017-03-07 05:48:41 +00:00