[wp-trac] [WordPress Trac] #44985: timezone_string should be valid when offset time zone mode is used

WordPress Trac noreply at wordpress.org
Mon Sep 24 15:19:53 UTC 2018


#44985: timezone_string should be valid when offset time zone mode is used
------------------------------------------+------------------------------
 Reporter:  Rarst                         |       Owner:  (none)
     Type:  enhancement                   |      Status:  new
 Priority:  normal                        |   Milestone:  Awaiting Review
Component:  Date/Time                     |     Version:  trunk
 Severity:  normal                        |  Resolution:
 Keywords:  needs-patch needs-unit-tests  |     Focuses:
------------------------------------------+------------------------------

Comment (by JPry):

 @Rarst

 I've worked on this recently in a plugin with the idea of fully allowing
 for any GMT offset or timezone string. If it helps, there are a few
 challenges that you'll find with this:

 1. Not all GMT offsets map to a timezone string
 2. Some (most?) GMT offsets map to more than one timezone string
 3. Beginning with PHP 7, the timezone strings that can be determined with
 the `timezone_name_from_abbr()` and `timezone_abbreviations_list()`
 functions has changed. You'll get different results for PHP < 7.0 and PHP
 >= 7.0.

 Hopefully that helps save you a few headaches. 🙂

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


More information about the wp-trac mailing list