Bug #67706 [NEW]: strtotime goes wrong for "last day of February next year"

From: Date: Tue, 29 Jul 2014 09:42:40 +0000
Subject: Bug #67706 [NEW]: strtotime goes wrong for "last day of February next year"
Groups: php.bugs 
Request: Send a blank email to php-bugs+get-186856@lists.php.net to get a copy of this message
From: greenrover33 at gmail dot com Operating system: Linux/Independent PHP version: 5.6Git-2014-07-29 (Git) Package: Date/time related Bug Type: Bug Bug description:strtotime goes wrong for "last day of February next year" Description: ------------ strtotime goes wrong for "last day of February next year" "last day of February next year" got the 31.03 the last day of march as result. Test script: --------------- $bug_from = 1406625924; // 29.07.2014 11:25 echo strftime('%d.%m.%Y %H:%M:%S', strtotime('last day of February next year', $bug_from)); echo ' != '; echo strftime('%d.%m.%Y %H:%M:%S', strtotime('last day of February 2015', $bug_from)); die(); Expected result: ---------------- 28.02.2015 00:00:00 != 28.02.2015 00:00:00 Actual result: -------------- 31.03.2015 00:00:00 != 28.02.2015 00:00:00 -- Edit bug report at https://bugs.php.net/bug.php?id=67706&edit=1 --

« previous php.bugs (#186856) next »