ZF-3233: addMonth returns unexpected results

Issue Type: Bug Created: 2008-05-10T18:11:22.000+0000 Last Updated: 2008-09-02T10:39:24.000+0000 Status: Resolved Fix version(s): - 1.6.0 (02/Sep/08)

Reporter: michael depetrillo (klassicd) Assignee: Thomas Weidner (thomas) Tags: - Zend_Date

Related issues: Attachments:


<pre class="highlight">
$now = new Zend_Date('2008-05-10 20:09:25', Zend_Date::ISO_8601);
echo $now . "\n";
$broke = clone $now;
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


Posted by Thomas Weidner (thomas) on 2008-05-15T10:44:05.000+0000

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

Posted by Wil Sinclair (wil) on 2008-09-02T10:39:24.000+0000

Updating for the 1.6.0 release.

Have you found an issue?

See the Overview section for more details.


© 2006-2016 by Zend, a Rogue Wave Company. Made with by awesome contributors.

This website is built using zend-expressive and it runs on PHP 7.