Bug 187533

Summary: strtotime Date Calculation Error - February
Product: [Fedora] Fedora Reporter: David Hart <davidhart>
Component: phpAssignee: Joe Orton <jorton>
Status: CLOSED NOTABUG QA Contact: David Lawrence <dkl>
Severity: medium Docs Contact:
Priority: medium    
Version: 5   
Target Milestone: ---   
Target Release: ---   
Hardware: i386   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2006-04-07 10:42:10 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description David Hart 2006-03-31 18:35:29 UTC
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:

      2006-03

Expected results:

      2006-02

Comment 1 Joe Orton 2006-04-07 10:42:10 UTC
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.

http://www.gnu.org/software/tar/manual/html_node/tar_115.html#SEC115

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