php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #27095 strtotime()
Submitted: 2004-01-30 04:05 UTC Modified: 2004-01-30 06:27 UTC
From: ozsvar at yahoo dot com Assigned:
Status: Not a bug Package: Date/time related
PHP Version: 4.3.4 OS: Linux, Windows
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: ozsvar at yahoo dot com
New email:
PHP Version: OS:

 

 [2004-01-30 04:05 UTC] ozsvar at yahoo dot com
Description:
------------
I have found a bug at function strtotime().
When the system date is 30. January and I call strtotime with parameter: +1 month the result is wrong: March!!!


Reproduce code:
---------------
<?
  // If the system date is 2004-01-30

  echo date("Y-m", strtotime("+1 month"));

  // The result will be 2004-03 !!!!!!
?>

Expected result:
----------------
I expect 2004-02 !!!


Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2004-01-30 04:16 UTC] ozsvar at yahoo dot com
My remark was wrong. I'm sorry. :(
 [2004-01-30 06:27 UTC] derick@php.net
Yup, there is no february 30th ;-)
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Sep 19 14:01:28 2024 UTC