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

WordPress Trac noreply at wordpress.org
Sun Feb 12 17:47:48 UTC 2017


#39854: REST API: Add gmt_offset to base /wp-json response
-------------------------+-----------------------
 Reporter:  jnylen0      |       Owner:
     Type:  enhancement  |      Status:  new
 Priority:  normal       |   Milestone:  4.8
Component:  REST API     |     Version:  4.7
 Severity:  normal       |  Resolution:
 Keywords:               |     Focuses:  rest-api
-------------------------+-----------------------

Comment (by jnylen0):

 Replying to [comment:1 swissspidy]:
 > Why only `gmt_offset` and not `timezone_string` as well?

 `gmt_offset` is more immediately useful to clients because it's an easily
 parseable number and `timezone_offset` isn't always set, but we could
 certainly do both.

 > Am I understanding this correctly: this ticket wants to add this to
 `/wp-json/`, while #39072 wants to add the setting to the settings
 endpoint?

 Yes - currently the settings endpoint is admin-only, so if we stick with
 that decision then there is value in having it in both places.  See also
 #38731.

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


More information about the wp-trac mailing list