Bug 187533 - strtotime Date Calculation Error - February
strtotime Date Calculation Error - February
Product: Fedora
Classification: Fedora
Component: php (Show other bugs)
i386 Linux
medium Severity medium
: ---
: ---
Assigned To: Joe Orton
David Lawrence
Depends On:
  Show dependency treegraph
Reported: 2006-03-31 13:35 EST by David Hart
Modified: 2007-11-30 17:11 EST (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2006-04-07 06:42:10 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description David Hart 2006-03-31 13:35:29 EST
Description of problem:
Please note that PHP reports "not a bug." I disagree. This applies to both FC4
and FC5.

Version-Release number of selected component (if applicable):
php-5.1.2-5 and php-5.0.4-10.5

How reproducible:
If current date = March 30 or March 31:

     $lastmonth=date('Y-m',strtotime("-1 month 1 day"));
Actual results:


Expected results:

Comment 1 Joe Orton 2006-04-07 06:42:10 EDT
Thanks for the report.

The PHP strtotime interface aims to be compatible with the GNU "Date Input
Format" syntax, per the PHP strtotime manual page.  Under that syntax, the
behaviour implemented here is as expected; it even gives a similar case an example.


I cannot see any reason to disagree with the upstream response on this.

Note You need to log in before you can comment on or make changes to this bug.