[wp-trac] [WordPress Trac] #34435: get_gmt_from_date() can return incorrect value when input during fall's DST switch
WordPress Trac
noreply at wordpress.org
Sun Oct 15 10:22:07 UTC 2017
#34435: get_gmt_from_date() can return incorrect value when input during fall's DST
switch
------------------------------------+-----------------------------
Reporter: danielbachhuber | Owner:
Type: defect (bug) | Status: new
Priority: normal | Milestone: Future Release
Component: Date/Time | Version:
Severity: normal | Resolution:
Keywords: needs-patch needs-docs | Focuses:
------------------------------------+-----------------------------
Comment (by Rarst):
Replying to [comment:2 danielbachhuber]:
> After talking this through time and time again, @viper007bond and I feel
reasonably confident that DST should be abolished.
>
> The bug is most likely that 1:23 am occurs twice in London on
2015-10-25. `DateTime` doesn't know how to distinguish between them when
doing relative time conversions so it assumes the later one. It could pick
the correct one if it knew the UTC time.
To be more precise what happens isn't just random assumption. PHP has a
registered transition for `Europe/London` from BST to GMT at
`2015-10-25T01:00:00+0000`. So I think input before `01:00` is considered
still in BST and after `01:00` is considered in GMT.
And yeah, on WP side it should ideally all just operate in UTC as much as
possible. Concept of a "local" time for a post is deeply broken in many
places.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/34435#comment:7>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list