Bug #76397 [NEW]: -n month is not sequential

From: Date: Thu, 31 May 2018 15:58:52 +0000
Subject: Bug #76397 [NEW]: -n month is not sequential
Groups: php.bugs 
Request: Send a blank email to php-bugs+get-215456@lists.php.net to get a copy of this message
From: i at cmsis dot me Operating system: linux PHP version: 5.6.36 Package: Date/time related Bug Type: Bug Bug description:-n month is not sequential Description: ------------ on 05-31 run strtotime('-1 month') and strtotime('-2 month') the month is not sequential Test script: --------------- echo date('Y-m-d H:i:s', strtotime('-1 month')) . "\n"; echo date('Y-m-d H:i:s', strtotime('-2 month')) . "\n"; Expected result: ---------------- the month should be sequential Actual result: -------------- -1 month for 05 and -2 month for 03 -- Edit bug report at https://bugs.php.net/bug.php?id=76397&edit=1 -- Try a snapshot (PHP 5.4): https://bugs.php.net/fix.php?id=76397&r=trysnapshot54 Try a snapshot (PHP 5.5): https://bugs.php.net/fix.php?id=76397&r=trysnapshot55 Try a snapshot (trunk): https://bugs.php.net/fix.php?id=76397&r=trysnapshottrunk Fixed in SVN: https://bugs.php.net/fix.php?id=76397&r=fixed Fixed in release: https://bugs.php.net/fix.php?id=76397&r=alreadyfixed Need backtrace: https://bugs.php.net/fix.php?id=76397&r=needtrace Need Reproduce Script: https://bugs.php.net/fix.php?id=76397&r=needscript Try newer version: https://bugs.php.net/fix.php?id=76397&r=oldversion Not developer issue: https://bugs.php.net/fix.php?id=76397&r=support Expected behavior: https://bugs.php.net/fix.php?id=76397&r=notwrong Not enough info: https://bugs.php.net/fix.php?id=76397&r=notenoughinfo Submitted twice: https://bugs.php.net/fix.php?id=76397&r=submittedtwice register_globals: https://bugs.php.net/fix.php?id=76397&r=globals PHP 4 support discontinued: https://bugs.php.net/fix.php?id=76397&r=php4 Daylight Savings: https://bugs.php.net/fix.php?id=76397&r=dst IIS Stability: https://bugs.php.net/fix.php?id=76397&r=isapi Install GNU Sed: https://bugs.php.net/fix.php?id=76397&r=gnused Floating point limitations: https://bugs.php.net/fix.php?id=76397&r=float No Zend Extensions: https://bugs.php.net/fix.php?id=76397&r=nozend MySQL Configuration Error: https://bugs.php.net/fix.php?id=76397&r=mysqlcfg

« previous php.bugs (#215456) next »