[wp-trac] [WordPress Trac] #39854: REST API: Add gmt_offset to base /wp-json response
WordPress Trac
noreply at wordpress.org
Tue Mar 7 05:47:34 UTC 2017
#39854: REST API: Add gmt_offset to base /wp-json response
---------------------------------------------+-----------------------
Reporter: jnylen0 | Owner: jnylen0
Type: enhancement | Status: closed
Priority: normal | Milestone: 4.7.4
Component: REST API | Version: 4.7
Severity: normal | Resolution: fixed
Keywords: has-patch has-unit-tests commit | Focuses: rest-api
---------------------------------------------+-----------------------
Changes (by jnylen0):
* status: accepted => closed
* resolution: => fixed
Comment:
In [changeset:"40238"]:
{{{
#!CommitTicketReference repository="" revision="40238"
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.
}}}
--
Ticket URL: <https://core.trac.wordpress.org/ticket/39854#comment:17>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list