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

WordPress Trac noreply at wordpress.org
Thu Dec 19 15:13:34 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:
--------------------------+------------------------------

Comment (by autotutorial):

 this is true before WordPress 5.3 existed.
 I do not currently agree WordPress has always been wrong to create dates.
 If the maximum portability of an independent date is desired from its
 offset (with daylight saving time applied or without the time applied or
 even with a different offset) .. WordPress creates dates only in UTC, the
 TimeZone only works on the output ( which must not correspond to daylight
 saving time) but the files created must be UTC otherwise it will not be
 compatible if I create a site in (UTC if the database used by the DateTime
 class is not updated produces different offsets depending on whether or
 not the offset is applied current.) and later set a timezone.
 So from a file created in UTC it is always possible to apply its offset,
 take as an example the russia sometimes apply summer time other times no.
 Since all the time zones are based on the UTC difference, creating UTC and
 displaying only that date in a timezone will be independent of the
 database used by the DateTime or offset class.
 I'm sorry I don't want to devalue your work but the timezone is not valid
 for the whole world if it is used to modify a date, while if you have a
 UTC date you can apply the timezone for the whole world (ie extract the
 date in UTC and display it in Timezone without further changes).
 I wrote it for completeness, I know that I did not express myself in the
 most correct manner.

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


More information about the wp-trac mailing list