Bug #72719 [NEW]: Broken classes inherited from DatePeriod

From: Date: Sun, 31 Jul 2016 10:14:03 +0000
Subject: Bug #72719 [NEW]: Broken classes inherited from DatePeriod
Groups: php.bugs 
Request: Send a blank email to php-bugs+get-202756@lists.php.net to get a copy of this message
From: filip at prochazka dot su Operating system: Linux PHP version: 7.1.0beta1 Package: Date/time related Bug Type: Bug Bug description:Broken classes inherited from DatePeriod Description: ------------ https://3v4l.org/hrZsA It works as expected at monday to saturday. But on sunday, it always returns monday no matter what weekday you give it, except sunday, that one works. Test script: --------------- var_dump(new DateTimeImmutable('Monday next week 13:00')); var_dump(new DateTimeImmutable('Tuesday next week 14:00')); var_dump(new DateTimeImmutable('Wednesday next week 14:00')); var_dump(new DateTimeImmutable('Thursday next week 15:00')); var_dump(new DateTimeImmutable('Friday next week 16:00')); var_dump(new DateTimeImmutable('Saturday next week 17:00')); var_dump(new DateTimeImmutable('Sunday next week 18:00')); Expected result: ---------------- 2016-08-08 13:00:00 2016-08-09 14:00:00 2016-08-10 14:00:00 2016-08-11 15:00:00 2016-08-12 16:00:00 2016-08-13 17:00:00 2016-08-14 18:00:00 Actual result: -------------- Output for 5.6.23 - 5.6.24, 7.0.8 - 7.1.0beta1 2016-08-01 13:00:00 2016-08-01 14:00:00 2016-08-01 14:00:00 2016-08-01 15:00:00 2016-08-01 16:00:00 2016-08-01 17:00:00 2016-08-07 18:00:00 Output for 5.6.0 - 5.6.22, hhvm-3.10.0 - 3.12.0, 7.0.0 - 7.0.7 2016-08-08 13:00:00 2016-08-09 14:00:00 2016-08-10 14:00:00 2016-08-11 15:00:00 2016-08-12 16:00:00 2016-08-13 17:00:00 2016-08-14 18:00:00 -- Edit bug report at https://bugs.php.net/bug.php?id=72719&edit=1 -- Try a snapshot (PHP 5.4): https://bugs.php.net/fix.php?id=72719&r=trysnapshot54 Try a snapshot (PHP 5.5): https://bugs.php.net/fix.php?id=72719&r=trysnapshot55 Try a snapshot (trunk): https://bugs.php.net/fix.php?id=72719&r=trysnapshottrunk Fixed in SVN: https://bugs.php.net/fix.php?id=72719&r=fixed Fixed in release: https://bugs.php.net/fix.php?id=72719&r=alreadyfixed Need backtrace: https://bugs.php.net/fix.php?id=72719&r=needtrace Need Reproduce Script: https://bugs.php.net/fix.php?id=72719&r=needscript Try newer version: https://bugs.php.net/fix.php?id=72719&r=oldversion Not developer issue: https://bugs.php.net/fix.php?id=72719&r=support Expected behavior: https://bugs.php.net/fix.php?id=72719&r=notwrong Not enough info: https://bugs.php.net/fix.php?id=72719&r=notenoughinfo Submitted twice: https://bugs.php.net/fix.php?id=72719&r=submittedtwice register_globals: https://bugs.php.net/fix.php?id=72719&r=globals PHP 4 support discontinued: https://bugs.php.net/fix.php?id=72719&r=php4 Daylight Savings: https://bugs.php.net/fix.php?id=72719&r=dst IIS Stability: https://bugs.php.net/fix.php?id=72719&r=isapi Install GNU Sed: https://bugs.php.net/fix.php?id=72719&r=gnused Floating point limitations: https://bugs.php.net/fix.php?id=72719&r=float No Zend Extensions: https://bugs.php.net/fix.php?id=72719&r=nozend MySQL Configuration Error: https://bugs.php.net/fix.php?id=72719&r=mysqlcfg

« previous php.bugs (#202756) next »