|  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.
Block user comment
Status: Assign to:
Bug Type:
From: n at tebru dot net
New email:
PHP Version: OS:


 [2019-12-18 04:46 UTC] n at tebru dot net
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:

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


Add a Patch

Pull Requests

Add a Pull Request


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.
 [2019-12-19 16:37 UTC] n at tebru dot net

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-2024 The PHP Group
All rights reserved.
Last updated: Mon Jul 15 08:01:28 2024 UTC