Opened 6 years ago
Closed 5 years ago
#43530 closed defect (bug) (duplicate)
date_i18n() outputs invalid Swatch Internet Time
Reported by: |
|
Owned by: | |
---|---|---|---|
Milestone: | Priority: | normal | |
Severity: | normal | Version: | |
Component: | Date/Time | Keywords: | has-unit-tests |
Focuses: | Cc: |
Description
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 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.
Attachments (2)
Change History (5)
#2
@
6 years ago
- Keywords has-patch removed
This isn't ready, patch just refers to work in #24730 on timezone retrieval and I don't think we got it sufficiently robust on PHP 5.2 (if that's even possible).
But! If core is bumped to PHP 5.6 that problem simply goes away, so I am suggesting we hold on for that.
Note: See
TracTickets for help on using
tickets.
Added test for date_i18n() outputs invalid Swatch Internet Time ticket 43530.