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

WordPress Trac noreply at wordpress.org
Tue Jul 3 16:27:16 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:
--------------------------------------+-----------------------------
Changes (by flixos90):

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


Comment:

 I took a closer look at [attachment:"trac-38771.diff"]. This is almost
 ready to go in I'd say. Three comments:

 * "Whether to use GMT timezone, only applies if timestamp is not
 provided." could probably turned into two separate sentences for
 readability.
 * The `$gmt` parameter documentation should also be updated for the
 `date_i18n` filter.
 * 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. If we decide, it's good as is, I'd
 still make a minor adjustment and only look up the option if it's actually
 needed.

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


More information about the wp-trac mailing list