[wp-trac] [WordPress Trac] #24730: Introduce a timezone-retrieval method

WordPress Trac noreply at wordpress.org
Mon May 27 11:41:21 UTC 2019


#24730: Introduce a timezone-retrieval method
--------------------------------------+------------------------------
 Reporter:  rmccue                    |       Owner:  (none)
     Type:  enhancement               |      Status:  new
 Priority:  normal                    |   Milestone:  Awaiting Review
Component:  Date/Time                 |     Version:
 Severity:  normal                    |  Resolution:
 Keywords:  has-patch has-unit-tests  |     Focuses:
--------------------------------------+------------------------------
Changes (by Rarst):

 * keywords:  has-patch needs-unit-tests => has-patch has-unit-tests


Comment:

 Added patch introducing two new functions:

 - `wp_timezone_string()` unified retrieval of time zone as string,
 straightforward upgrade from `get_option('timezone_string')`
 - `wp_timezone()` unified retrieval of timezone as object

 Includes unit tests for all numeric offsets currently used by core.

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


More information about the wp-trac mailing list