Bug #72514 [NEW]: Behaviour of relative date format "this week" has changed

From: Date: Wed, 29 Jun 2016 10:00:37 +0000
Subject: Bug #72514 [NEW]: Behaviour of relative date format "this week" has changed
Groups: php.bugs 
Request: Send a blank email to php-bugs+get-201901@lists.php.net to get a copy of this message
From: roelharbers at gmail dot com Operating system: Ubuntu, OSX PHP version: 5.6.23 Package: Date/time related Bug Type: Bug Bug description:Behaviour of relative date format "this week" has changed 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 -- Edit bug report at https://bugs.php.net/bug.php?id=72514&edit=1 -- Try a snapshot (PHP 5.4): https://bugs.php.net/fix.php?id=72514&r=trysnapshot54 Try a snapshot (PHP 5.5): https://bugs.php.net/fix.php?id=72514&r=trysnapshot55 Try a snapshot (trunk): https://bugs.php.net/fix.php?id=72514&r=trysnapshottrunk Fixed in SVN: https://bugs.php.net/fix.php?id=72514&r=fixed Fixed in release: https://bugs.php.net/fix.php?id=72514&r=alreadyfixed Need backtrace: https://bugs.php.net/fix.php?id=72514&r=needtrace Need Reproduce Script: https://bugs.php.net/fix.php?id=72514&r=needscript Try newer version: https://bugs.php.net/fix.php?id=72514&r=oldversion Not developer issue: https://bugs.php.net/fix.php?id=72514&r=support Expected behavior: https://bugs.php.net/fix.php?id=72514&r=notwrong Not enough info: https://bugs.php.net/fix.php?id=72514&r=notenoughinfo Submitted twice: https://bugs.php.net/fix.php?id=72514&r=submittedtwice register_globals: https://bugs.php.net/fix.php?id=72514&r=globals PHP 4 support discontinued: https://bugs.php.net/fix.php?id=72514&r=php4 Daylight Savings: https://bugs.php.net/fix.php?id=72514&r=dst IIS Stability: https://bugs.php.net/fix.php?id=72514&r=isapi Install GNU Sed: https://bugs.php.net/fix.php?id=72514&r=gnused Floating point limitations: https://bugs.php.net/fix.php?id=72514&r=float No Zend Extensions: https://bugs.php.net/fix.php?id=72514&r=nozend MySQL Configuration Error: https://bugs.php.net/fix.php?id=72514&r=mysqlcfg

« previous php.bugs (#201901) next »