Go to file
James Nylen 8bbe6a0d50 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.


git-svn-id: https://develop.svn.wordpress.org/trunk@40238 602fd350-edb4-49c9-b593-d223f7449a82
2017-03-07 05:47:32 +00:00
src REST API: Add `gmt_offset` and `timezone_string` to the base `/wp-json` response. 2017-03-07 05:47:32 +00:00
tests REST API: Add `gmt_offset` and `timezone_string` to the base `/wp-json` response. 2017-03-07 05:47:32 +00:00
tools/i18n
.editorconfig
.gitignore Build/Test Tools: Facilitate SVN and Git being co-located in the same directory. 2016-12-12 05:11:27 +00:00
.jshintrc Build/Test Tools: After [29858], update `.jsintrc` to use spaces, not tabs. 2017-01-13 04:44:53 +00:00
.travis.yml Build/Test Tools: Only attempt to disable Xdebug on stable builds of PHP. 2017-02-28 00:03:18 +00:00
Gruntfile.js REST API: improve test fixture generation, normalizing data. 2017-02-15 17:58:14 +00:00
package.json Build/Test Tools: Specify exact node version in package.json. 2016-12-04 17:29:26 +00:00
phpunit.xml.dist oEmbed: Remove the oEmbed provider unit tests. 2016-10-20 09:15:10 +00:00
wp-cli.yml
wp-config-sample.php
wp-tests-config-sample.php Tests: Use a minimal theme for tests. 2016-10-21 11:02:37 +00:00