ZF-5723: Zend_Date outputs wrong year

Description

Try this code:


$date = new Zend_Date();
$date->set($from, Zend_Date::TIMESTAMP);

//$from is dynamically passed timestamp

Zend_Debug::dump($from);
Zend_Debug::dump(date('Y-m-d H:i:s', $from)); 
Zend_Debug::dump($date->get(Dnez_Date::DB_DATETIME));
exit();

//source of Dnez_Date class

class Dnez_Date extends Zend_Date
{

    const DB_DATE = 'YYYY-MM-dd';
    const DB_DATETIME = 'YYYY-MM-dd HH:mm:ss';

}

The result is:

int 1262296800
string '2010-01-01 00:00:00' (length=19)
string '2009-01-01 00:00:00' (length=19)

For some reason Zend_Date give me wrong year.

p.s. I just downloaded the latest trunk version of framework.

Comments

Please see the documentation on what your problem is (hint: Y vs y).