|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2016-09-21 20:35 UTC] bwoebi@php.net
-Status: Open
+Status: Assigned
-Package: *General Issues
+Package: Date/time related
-Assigned To:
+Assigned To: derick
[2016-09-21 20:35 UTC] bwoebi@php.net
[2021-10-01 16:09 UTC] cmb@php.net
-Status: Assigned
+Status: Duplicate
-Assigned To: derick
+Assigned To: cmb
[2021-10-01 16:09 UTC] cmb@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Fri Oct 24 09:00:01 2025 UTC |
Description: ------------ strtotime does not calculate correctly when adding or subtracting time relatively while exiting DST. Test script: --------------- date_default_timezone_set("Europe/Amsterdam"); echo strtotime('+ 1 second', 1477789199); // exiting DST in October, echoes 1477792800 in stead of 1477789200 echo strtotime('+ 1 second - 1 second', 1477789199); // exiting and re-entering DST, echoes 1477792799 in stead of 1477789199 echo strtotime('- 1 second', 1459040400); // exiting DST in March, echoes 1459043999 in stead of 1459040399 Expected result: ---------------- see the comments in the test script Actual result: -------------- one hour of unwanted difference