|  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
Have you experienced this issue?
Rate the importance of this bug to you:

 [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-2021 The PHP Group
All rights reserved.
Last updated: Sun Oct 24 15:03:33 2021 UTC