ZF-3233: addMonth returns unexpected results

Description


date_default_timezone_set('America/Los_Angeles');
$now = new Zend_Date('2008-05-10 20:09:25', Zend_Date::ISO_8601);
echo $now . "\n";
$broke = clone $now;
$broke->addMonth(1);
echo $broke;

Result May 10, 2008 8:09:25 PM Jun 1, 2008 8:09:25 PM

Expected Result May 10, 2008 8:09:25 PM Jun 10, 2008 8:09:25 PM

Adding Zend_Date::setOptions(array('extend_month' => true)); fixes this problem for me. But, I would prefer to use the SQL method for adding months and not the spreadsheet style.

php -v PHP 5.2.5 (cli) (built: Feb 20 2008 12:30:47) Copyright (c) 1997-2007 The PHP Group Zend Engine v2.2.0, Copyright (c) 1998-2007 Zend Technologies

Comments

Not reproducable with the actual trunk version. Possibly already fixed in trunk with the actual r9459.

Updating for the 1.6.0 release.