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
Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know!
Just going to say 'Me too!'? Don't clutter the database with that please — but make sure to vote on the bug!
Your email address:
MUST BE VALID
Solve the problem:
19 + 33 = ?
Subscribe to this entry?

 
 [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-2024 The PHP Group
All rights reserved.
Last updated: Tue Apr 23 17:01:31 2024 UTC