[wp-trac] [WordPress Trac] #39854: REST API: Add gmt_offset to base /wp-json response

WordPress Trac noreply at wordpress.org
Mon Feb 27 07:49:05 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 has-patch  |     Focuses:  rest-api
----------------------------------------+-----------------------
Changes (by jnylen0):

 * keywords:  needs-unit-tests needs-refresh dev-feedback needs-patch =>
     needs-unit-tests has-patch


Comment:

 Replying to [comment:9 rmccue]:
 > `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()`

 Thanks - I always forget how this works 🙈

 Given the discussion above, [attachment:39854.4.patch] looks good to me,
 just needs tests.

--
Ticket URL: <https://core.trac.wordpress.org/ticket/39854#comment:11>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list