Bug #51096 [Asn->Csd]: strtotime returns wrong results

From: Date: Thu, 31 Jul 2014 13:45:13 +0000
Subject: Bug #51096 [Asn->Csd]: strtotime returns wrong results
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-186908@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=51096&edit=1 ID: 51096 Updated by: salathe@php.net Reported by: phpbugs at rizzt dot kicks-ass dot org Summary: strtotime returns wrong results -Status: Assigned +Status: Closed Type: Bug Package: Date/time related Operating System: linux PHP Version: 5.2.12 Assigned To: derick Block user comment: N Private report: N New Comment: Regarding "Re-opening because of the question marks ... It shouldn't cause an issue though, but it needs fixing.", that was fixed today. Previous Comments: ------------------------------------------------------------------------ [2014-07-31 12:11:22] salathe@php.net Related To: Bug #67722 ------------------------------------------------------------------------ [2013-12-24 16:57:05] salathe@php.net Related To: Bug #65807 ------------------------------------------------------------------------ [2010-03-31 22:12:51] derick@php.net @wayne: http://derickrethans.nl/obtaining-the-next-month-in-php.html ------------------------------------------------------------------------ [2010-03-31 21:12:42] wayne530 at gmail dot com @derick can you comment on what exactly should be the behavior of strtotime('-1 month') or strtotime('last month')? today 3/31/10 date('Y-m-d', strtotime('-1 month')) returns '2010-03-03' date('Y-m-d', strtotime('+1 month')) returns '2010-05-01' -1 month seems to offset by 28 days. +1 month seems to offset by 31 days. is this correct behavior? ------------------------------------------------------------------------ [2010-03-31 15:32:08] derick@php.net @marques: You're wrong, that's perfectly correct behaviour for last month/previous month. It is also unrelated to this report. ------------------------------------------------------------------------ The remainder of the comments for this report are too long. To view the rest of the comments, please view the bug report online at https://bugs.php.net/bug.php?id=51096 -- Edit this bug report at https://bugs.php.net/bug.php?id=51096&edit=1

« previous php.bugs (#186908) next »