From: zhang_yinshu at yahoo dot com
Operating system: linux
PHP version: 5.0.0RC1
PHP Bug Type: Date/time related
Bug description: "last month" bypass feb.
Description:
------------
if call function strtotime("last month") or ("-1 month") at Mar. 30th
2004, it will return 3/1/04. ("-2 month") produce correct output.
Reproduce code:
---------------
<?
// run it at 3/30 or 3/31
$date=strtotime("-1 month");
echo strftime('%D',$date);
$date=strtotime("this month");
echo strftime('%D',$date);
?>
--
Edit bug report at http://bugs.php.net/?id=27786&edit=1
--
Try a CVS snapshot (php4): http://bugs.php.net/fix.php?id=27786&r=trysnapshot4
Try a CVS snapshot (php5): http://bugs.php.net/fix.php?id=27786&r=trysnapshot5
Fixed in CVS: http://bugs.php.net/fix.php?id=27786&r=fixedcvs
Fixed in release: http://bugs.php.net/fix.php?id=27786&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=27786&r=needtrace
Need Reproduce Script: http://bugs.php.net/fix.php?id=27786&r=needscript
Try newer version: http://bugs.php.net/fix.php?id=27786&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=27786&r=support
Expected behavior: http://bugs.php.net/fix.php?id=27786&r=notwrong
Not enough info: http://bugs.php.net/fix.php?id=27786&r=notenoughinfo
Submitted twice: http://bugs.php.net/fix.php?id=27786&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=27786&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=27786&r=php3
Daylight Savings: http://bugs.php.net/fix.php?id=27786&r=dst
IIS Stability: http://bugs.php.net/fix.php?id=27786&r=isapi
Install GNU Sed: http://bugs.php.net/fix.php?id=27786&r=gnused
Floating point limitations: http://bugs.php.net/fix.php?id=27786&r=float