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

WordPress Trac noreply at wordpress.org
Wed Mar 13 15:42:50 UTC 2019


#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:
 Severity:  normal                        |  Resolution:
 Keywords:  needs-patch needs-unit-tests  |     Focuses:
------------------------------------------+------------------------------

Comment (by Rarst):

 I got conversion logic down with unit tests and everything in
 https://github.com/Rarst/wpdatetime/blob/master/src/WpDateTimeZone.php

 Yeah, those IDs don't work with `date_default_timezone_set()` but empty
 string case ''also'' doesn't work with it. And if anyone is calling
 `date_default_timezone_set()` in WP context they are "doing it wrong". In
 core that case works because it explicitly checks for empty.

 That said we should get rid of that `date_default_timezone_set()`
 altogether there. It's one of those really really old pieces of Date/Time.
 I'll make a ticket for that.

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


More information about the wp-trac mailing list