[wp-trac] [WordPress Trac] #38771: date_i18n() arguments are misleading in function and documentation

WordPress Trac noreply at wordpress.org
Wed Jul 4 09:52:06 UTC 2018


#38771: date_i18n() arguments are misleading in function and documentation
--------------------------------------+-----------------------------
 Reporter:  Rarst                     |       Owner:  SergeyBiryukov
     Type:  enhancement               |      Status:  reviewing
 Priority:  normal                    |   Milestone:  5.0
Component:  Date/Time                 |     Version:  4.7
 Severity:  normal                    |  Resolution:
 Keywords:  has-patch has-unit-tests  |     Focuses:
--------------------------------------+-----------------------------

Comment (by Rarst):

 > Would it make sense for now to only set $timezone_string to "UTC" if it
 is generally being used (i.e. if the timezone_string option is set)? Not
 sure, but I could see it reducing the chance of issues with sites still
 relying on gmt_offset only.

 Not quite following this part. We only set it to UTC if we ''have'' time
 zones in format, so we ''are'' going to need it. And if we are in a GMT
 mode then we don't care about `gmt_offset` or `timezone_string` either, we
 are just producing UTC output regardless of WP settings.

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


More information about the wp-trac mailing list