Issue Type: Bug Created: 2009-08-03T09:11:41.000+0000 Last Updated: 2009-08-14T15:58:58.000+0000 Status: Resolved Fix version(s): - 1.9.2 (25/Aug/09)
Reporter: Travis Pew (travisp) Assignee: Thomas Weidner (thomas) Tags: - Zend_Date
Related issues: Attachments:
According to the reference manual, dates can be created in Zend_Date using an array: 14.5.3. Create Dates from an Array
This was the case in the 1.8 branch, but it doesn't seem to work for me in 1.9:
<pre class="highlight"> $mydate = new Zend_Date(array( 'year'=>2008, 'month'=>3, 'day'=>1) ); var_dump($mydate->toString()); //ZF 1.8.4 (latest from 1.8 svn branch): string 'Mar 1, 2008 12:00:00 AM' (length=23) //ZF 1.9 (latest from 1.9 svn branch): string 'Feb 29, 2008 11:00:00 PM' (length=24)
Posted by Travis Pew (travisp) on 2009-08-03T14:11:54.000+0000
This regression was introduced in revision 15909 which specifies it was a "fix for a Redhat only problem ".
I am noticing this problem on an Ubuntu Server.
Also, just in case this is server specific, it occurs for me on:
Ubuntu Server 9.04 (running kernel 2.6.28-13) with PHP 5.2.6
As best I can tell, the result of revision 15909 was that a different unixTimeStamp is set in the default date object. This changes the default date parts from 1/1/1970 to 12/31/1969, which then messes up the subsequent setting of date parts.
Reversing 15909 fixes this problem for me, although I suppose it creates different problems again for Red Hat Server users. Ultimately the problem is probably not 15909 but code somewhere else, although I'm not familiar enough with Zend_Date to be sure where.
Posted by Dolf Schimmel (Freeaqingme) (freak) on 2009-08-03T14:19:43.000+0000
Same problem here. Guess this asks for a quick fix (if necessary revert r15909?)
Posted by Thomas Weidner (thomas) on 2009-08-14T15:58:58.000+0000
Fixed with r17613
Have you found an issue?
See the Overview section for more details.