[wp-trac] [WordPress Trac] #39072: Add gmt_offset as a REST API setting

WordPress Trac noreply at wordpress.org
Sun Dec 4 20:21:44 UTC 2016

#39072: Add gmt_offset as a REST API setting
 Reporter:  jshreve       |      Owner:
     Type:  defect (bug)  |     Status:  new
 Priority:  normal        |  Milestone:  Awaiting Review
Component:  REST API      |    Version:  trunk
 Severity:  normal        |   Keywords:
  Focuses:  rest-api      |
 The timezone string can be seen and updated via the REST API, but there is
 no way to get the GMT offset (which I would imagine is more more valuable
 for calculating things). There is also no way to update it (aka manual

 The attached patch is one way to fix it. It makes sure to clear out the
 timezone string if you are manually overriding/setting the offset. I'm not
 sure if what I have is the best way to handle that case for the API, but I
 took a stab at it. If a timezone string is set, the offset is correctly
 returned for that timezone.

Ticket URL: <https://core.trac.wordpress.org/ticket/39072>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform

More information about the wp-trac mailing list