Issues

ZF-9691: Invalid locale is passed to Zend_Date::_calcdetail()

Description

Zend_Date::_date() and Zend_Date::_time() are passing invalid locale to Zend_Date::_calcdetail(): $return = $this->_calcdetail($calc, $time, self::TIMES, 'de'); // 'de' is used instead of $locale

Comments

Patch for fixing issue, created agains rev.21753

This is no failure. The code works as intended.

Please give a reproducable example to see what your problem is!

Closing as non-issue No response from the reporter

This issue is still present.

Problem example:

$date = Zend_Date::now('en_US'); $date->addDate('1 month'); // If file "de.xml" is deleted - exception appears ("locale 'de' not found")

Can confirm this.

Example: Zend_Date::now()->setTime('00:00:00', 'HH:mm:ss', 'pl_PL');

If we give locale "pl_PL" method setTime still uses "de" locale (by calling Zend/Date.php(3478): Zend_Date->set('00:00:00', 'WW', 'de')). Additionally if file "de.xml" is missing an exception occurs.