Bug #61564 [Opn->Nab]: -1 month problem
Edit report at https://bugs.php.net/bug.php?id=61564&edit=1
ID: 61564
Updated by: rasmus@php.net
Reported by: coolbig at bk dot ru
Summary: -1 month problem
-Status: Open
+Status: Not a bug
Type: Bug
Package: Date/time related
Operating System: windows 7
PHP Version: 5.3.10
Block user comment: N
Private report: N
New Comment:
This is not a bug. Feb.30 doesn't exist.
More details here: http://derickrethans.nl/obtaining-the-next-month-in-php.html
Previous Comments:
------------------------------------------------------------------------
[2012-03-30 13:36:53] coolbig at bk dot ru
Description:
------------
Strtotime() show bad result!
At my pc: 2012/03/30 16:26 (Kiev)
=====================
Php show bad result:
echo date('d-m-Y, H:i', strtotime('-1 month'));
// 30-01-2012, 16:26
MySQL show good result:
select CURRENT_TIMESTAMP - interval 1 month
// 2012-02-29 16:26:51
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=61564&edit=1
Thread (2 messages)