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

WordPress Trac noreply at wordpress.org
Tue Jun 26 14:40:43 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 needs-unit-tests  |     Focuses:
----------------------------------------+-----------------------------

Comment (by Rarst):

 A bit more context on problem with `$gmt` and pending code fix:

 1. `$gmt` is ''only'' applied if timestamp ''is not'' provided. Otherwise
 it's ignored. Inline documentation needs to reflect that.
 2. The output is currently broken by outputting UTC time with WP timezone,
 which produces incorrect current time. This is hard to notice since
 timezone isn't often included in output format (linked core usage doesn't
 have it).

 I'll work on unit test and submit a new patch for the code fix part.

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


More information about the wp-trac mailing list