php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #61564 -1 month problem
Submitted: 2012-03-30 13:36 UTC Modified: 2012-03-30 18:41 UTC
From: coolbig at bk dot ru Assigned:
Status: Not a bug Package: Date/time related
PHP Version: 5.3.10 OS: windows 7
Private report: No CVE-ID: None
 [2012-03-30 13:36 UTC] 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


Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2012-03-30 18:41 UTC] rasmus@php.net
This is not a bug. Feb.30 doesn't exist.

More details here: http://derickrethans.nl/obtaining-the-next-month-in-php.html
 [2012-03-30 18:41 UTC] rasmus@php.net
-Status: Open +Status: Not a bug
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Wed Apr 24 08:01:29 2024 UTC