|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2016-06-29 11:36 UTC] cmb@php.net
-Status: Open
+Status: Verified
-Assigned To:
+Assigned To: cmb
[2016-06-29 11:36 UTC] cmb@php.net
[2016-06-29 11:36 UTC] cmb@php.net
-Type: Bug
+Type: Documentation Problem
[2016-06-29 11:44 UTC] cmb@php.net
[2016-06-29 11:47 UTC] cmb@php.net
-Assigned To: cmb
+Assigned To: tyrael
[2016-06-29 11:47 UTC] cmb@php.net
[2016-07-03 22:44 UTC] tyrael@php.net
[2016-07-03 22:55 UTC] cmb@php.net
-Assigned To: tyrael
+Assigned To: ab
[2016-07-03 22:55 UTC] cmb@php.net
[2016-07-04 09:12 UTC] ab@php.net
-Status: Verified
+Status: Closed
[2016-07-04 09:12 UTC] ab@php.net
[2020-02-07 06:07 UTC] phpdocbot@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Tue Nov 04 13:00:02 2025 UTC |
Description: ------------ In php v5.6.22, the relative date format "this week" returns the next monday when called on a sunday date. In php v5.6.23, it returns the previous monday. It might be that the new behaviour is better, however, I find no mention of this backward compatibility breaking change in the changelog. Test script: --------------- for v in 5.6.22 5.6.23; do ( echo $v: ; docker run --rm php:$v php -r 'date_default_timezone_set("UTC");echo (new DateTime("2016-06-19"))->modify("this week")->format("c")."\n";') done Expected result: ---------------- I expect both versions to return the same. Actual result: -------------- 5.6.22: 2016-06-20T12:00:00+00:00 5.6.23: 2016-06-13T12:00:00+00:00