ZF-11755: Zend_Date / Zend_Locale_Format wrong interpretation of date string

Description

From twitter i get the following date string: Tue Sep 20 11:26:03 +0000 2011 Trying to set it like this: $string = 'Tue Sep 20 11:26:03 +0000 2011'; $format = 'EEE MMM dd HH:mm:ss ZZ YYYY'; $date = new Zend_Date(); $date->set($string, $format);

Zend_Date successfully parses the timezone out of the string with: getTimezoneFromString.

Later in Zend_Locale_Format::_parseDate the code does not recognize the included ZZ within the date_format string: It only increases $cnt if it finds one of the predefined cases, but not if there is any other value between. So the wrong value is returned from $splitted in line 912.

It does not parse the date correctly even if i tell the format of the date it receives.

Comments

No comments to display