ZF-6884: Zend_Date produces mix up day and month with english locale

Description

Zend_Date seems to mix up the day and month when using english locales.


// Example input
$oDate = new Zend_Date('2009-05-06 18:35:01');
echo $oDate->get(Zend_Date::DATE_MEDIUM);

produces Jun 5, 2009 instead of May 6, 2009

When I use


$oDate = new Zend_Date(strtotime('2009-05-06 18:35:01'));
echo $oDate->get(Zend_Date::DATE_MEDIUM);

the result is correct

Comments

At the first you say:

"Detect me the input and the locale because I don't know anything"... the given date string does not conform english default date so the system tries to detect it and this seems not to conform your expectations.

Note that there are about more than 400 different date formats and several of them are contrahary to each other.

By the second you have a integer value which is automatically detected as timestamp.

The rule is simple: * When you know the input format, then define it * When you know the locale, then define it

Additionally, when you try to debug a date object give the complete date representation and not only a part (use ->getIso())

Closing due to no response

to me a date in the format "2009-05-06 18:35:01" always means "YEAR-MONTH-DAY HOUR:MINUTE:SECOND", I have never ever seen that format where it means "YEAR-DAY-MONTH...". So i suggest this gets fixed, unless somebody can show that this format is actually used in a localized way.

Sorry, but reproduction on given example does not show problems. And there are still no details returned after two years.

So I suggest to keep this issue closed.