[wp-trac] [WordPress Trac] #39854: REST API: Add gmt_offset to base /wp-json response
WordPress Trac
noreply at wordpress.org
Mon Feb 27 00:33:21 UTC 2017
#39854: REST API: Add gmt_offset to base /wp-json response
-------------------------------------------------+-------------------------
Reporter: jnylen0 | Owner: jnylen0
Type: enhancement | Status: accepted
Priority: normal | Milestone: 4.8
Component: REST API | Version: 4.7
Severity: normal | Resolution:
Keywords: needs-unit-tests needs-refresh dev- | Focuses: rest-api
feedback needs-patch |
-------------------------------------------------+-------------------------
Comment (by rmccue):
Replying to [comment:3 jnylen0]:
> We also need to make sure that `gmt_offset` returns an appropriate value
even if the `timezone_string` is set instead, to e.g. `America/New_York`.
These two options behave a bit strangely together.
Also on this point, `gmt_offset` is shimmed in
`wp_timezone_override_offset()`, so ''reading'' it is always accurate.
Only writes are tricky, but we're not handling this here, so no need to do
anything special other than `get_option()`
--
Ticket URL: <https://core.trac.wordpress.org/ticket/39854#comment:9>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list