|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #27774 Bug in strtotime calculation (bissextile year ?)
Submitted: 2004-03-30 07:14 UTC Modified: 2004-03-30 07:33 UTC
From: eparis at plurimedia dot fr Assigned:
Status: Not a bug Package: Date/time related
PHP Version: Irrelevant OS: Linux Debian / Solaris ... any
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
Block user comment
Status: Assign to:
Bug Type:
From: eparis at plurimedia dot fr
New email:
PHP Version: OS:


 [2004-03-30 07:14 UTC] eparis at plurimedia dot fr
 Since today (2004-03-30), we experience a calculation error when using strtotime("-1 month") to get previous month date. Maybe this error is due to the fact that 2004 is a bissextile year. The last bissextile year was 1996.

Reproduce code:
 The actual computer date must be 2004-03-30.

  print strftime("%Y-%m-%d", strtotime("-1 month"))."\n";

Expected result:

Actual result:


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2004-03-30 07:33 UTC]
Thank you for taking the time to write to us, but this is not
a bug. Please double-check the documentation available at and the instructions on how to report
a bug at

march 30 - 1 month = feb 30; that doesn\'t exist and is the same as march 1.
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Fri May 24 02:01:32 2024 UTC