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
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: coolbig at bk dot ru
New email:
PHP Version: OS:

 

 [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

Pull Requests

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-2025 The PHP Group
All rights reserved.
Last updated: Tue May 06 11:01:30 2025 UTC