[wp-trac] [WordPress Trac] #43530: date_i18n() outputs invalid Swatch Internet Time
WordPress Trac
noreply at wordpress.org
Mon Mar 12 15:41:42 UTC 2018
#43530: date_i18n() outputs invalid Swatch Internet Time
--------------------------+-----------------------------
Reporter: Rarst | Owner:
Type: defect (bug) | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Date/Time | Version: trunk
Severity: normal | Keywords:
Focuses: |
--------------------------+-----------------------------
Since `date_i18n()` operates with "WordPress timestamp" which is summed up
with time zone offset, it doesn't produce correct result for `B` format
which doesn't vary with time zone.
{{{#!php
<?php
var_dump( date( 'B' ), date_i18n( 'B' ) );
// string(3) "692" string(3) "775"
}}}
Honestly with all the outstanding problems with the function it's more of
a curiosity than urgent problem, but something that needs to be considered
if it's ever fixed or replaced.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/43530>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list