[wp-trac] [WordPress Trac] #49038: Timezone setting does not display correct time of next DST transition (was: wp_date)

WordPress Trac noreply at wordpress.org
Thu Dec 19 14:53:26 UTC 2019


#49038: Timezone setting does not display correct time of next DST transition
--------------------------+------------------------------
 Reporter:  autotutorial  |       Owner:  Rarst
     Type:  defect (bug)  |      Status:  assigned
 Priority:  normal        |   Milestone:  Awaiting Review
Component:  Date/Time     |     Version:
 Severity:  normal        |  Resolution:
 Keywords:                |     Focuses:
--------------------------+------------------------------
Changes (by Rarst):

 * owner:  (none) => Rarst
 * status:  new => assigned
 * severity:  critical => normal


Comment:

 Think I got it.

 The next transition in `Europe/Rome` time zone is at `March 29, 2020 1:00
 am` UTC which is `March 29, 2020 3:00 am` in local time zone, but settings
 screen shows `March 29, 2020 12:00 am` due to `date_i18n()` output with
 incorrect offset math.

 This might have regressed because `date_i18n()` previously didn't produce
 correct output across the DST boundary (because it added offset at the
 ''current'' time, not target time) and someone might have attempted to
 overcorrect by providing double-adjusted timestamp as input to it.

 Basically that needs to be scrapped and replaced with sane `wp_date()`
 call, will do.

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


More information about the wp-trac mailing list