Create dates with $part = Zend_Date::ISO_8601 when comes from the database:
... new Zend_Date( "2008-08-29 17:30:00", Zend_Date::ISO_8601 ) ... ... new Zend_Date( "2008-09-01 08:25:00", Zend_Date::ISO_8601 ) ... ----- Original Message ----- From: "Juan Felipe Alvarez Saldarriaga" <[EMAIL PROTECTED]> To: "fw-general" <[email protected]> Sent: Tuesday, September 2, 2008 3:48:27 PM GMT -05:00 Columbia Subject: [fw-general] Zend_Date issue when try to return a date using the toString method, ZF 1.5.2 Hey! I got this code: (http://paste2.org/p/69212) $objAppointments = new Appointments(); $return = $objAppointments->filter( new Zend_Config( array( "objDateStart" => new Zend_Date( "2008-08-29 17:30:00" ), "objDateEnd" => new Zend_Date( "2008-09-01 08:25:00" ) ) ) ); // Inside Appointments::filter method. Zend_Date::setOptions( array( "format_type" => "php" ) ); $dateEnd = $objArguments->objDateEnd->toString( "Y-m-d H:i:s" ) $dateStart = $objArguments->objDateStart->toString( "Y-m-d H:i:s" ) // string(19) "2008-01-09 08:25:00", see the month and the day? the day is in place of the moneht and the month in the day. Zend_Debug::dump( $dateEnd ); // string(19) "2008-08-29 17:30:00" Zend_Debug::dump( $dateStart ); Why month and day are wrong in $dateEnd ? Thx for any help.
