Zend Framework

Zend_Date::getDate() throws Zend_Date_Exception with message [Unable to parse the date format string]

Details

  • Type: Bug Bug
  • Status: Resolved Resolved
  • Priority: Major Major
  • Resolution: Cannot Reproduce
  • Affects Version/s: 1.7.6
  • Fix Version/s: 1.8.0
  • Component/s: Zend_Date
  • Labels:
    None

Description

The following code causes the failure:

Zend_Date::now('uk')->getDate('uk')

This happens for a number of different locales (about 80), I used the code below to get the number:

$allLocales = Zend_Locale::getLocaleList();
        $failing = array();
        foreach ($allLocales as $locale => $val) {
            try {
                Zend_Date::now($locale)->getDate($locale);
            }
            catch (Exception $e)
            {
                $failing []= $locale;
            }
        }
        var_dump($failing);

Activity

Hide
Stanislaw Osinski added a comment -

PHP Info from the test environment.

Show
Stanislaw Osinski added a comment - PHP Info from the test environment.
Hide
Thomas Weidner added a comment -

Interesting, but useless.

Not all locales exist within CLDR. "und" or "bn_CN" for example.
They are given by LocaleList as this list returns the description for locales from the requested CLDR data and not from the available files. You are requesting data for the browser locale as you omitted the locale parameter for getLocaleList().

Excluding those cases where no locale file is available there are no failed detections.

Show
Thomas Weidner added a comment - Interesting, but useless. Not all locales exist within CLDR. "und" or "bn_CN" for example. They are given by LocaleList as this list returns the description for locales from the requested CLDR data and not from the available files. You are requesting data for the browser locale as you omitted the locale parameter for getLocaleList(). Excluding those cases where no locale file is available there are no failed detections.
Hide
Thomas Weidner added a comment -

Cannot reproduce in trunk.
Example code is broken.

Show
Thomas Weidner added a comment - Cannot reproduce in trunk. Example code is broken.

People

Vote (0)
Watch (0)

Dates

  • Created:
    Updated:
    Resolved: