php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #78988 Issue with DST -> Standard transition for positive offsets
Submitted: 2019-12-18 04:46 UTC Modified: -
From: n at tebru dot net Assigned:
Status: Open Package: *General Issues
PHP Version: Irrelevant OS: linux
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: n at tebru dot net
New email:
PHP Version: OS:

 

 [2019-12-18 04:46 UTC] n at tebru dot net
Description:
------------
The script below lists all of the timezones affected with the following conditions:

1. Timezone using DST
2. Date constructed 1 second before transition to standard time
3. Date is not in DST

For example, if a timezone moves back to 2AM at 3AM, a date constructed at 2:59:59AM DST. Adding a second should move it back to 2AM standard time. What I'm seeing is all of the timezones with positive offsets are getting constructed in standard time and most (except for one) of the timezones with negative offsets are getting constructed in DST.

Test script:
---------------
https://3v4l.org/vslF6

Expected result:
----------------
All dates behave the same way with respect to DST.


Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2019-12-18 21:39 UTC] n at tebru dot net
To add on to this, I found a similar problem. I have a timestamp starting at the second time through an hour during a fallback. When I construct the date from the timestamp and output it, it's correct. When I set the timezone, it moves back to the first time through the hour.

https://3v4l.org/aR7r3
 [2019-12-19 16:37 UTC] n at tebru dot net
https://3v4l.org/TCEIF

Here's an extended test that shows I can't reference time within the second time through an hour after a fall back.
 
PHP Copyright © 2001-2020 The PHP Group
All rights reserved.
Last updated: Sat Oct 31 01:01:22 2020 UTC