Issues

ZF-8702: getDateModified() returns incorrect date if RSS feed has near-standard date formatting (see ZF7908)

Description

Related to Issue ZF7908, I still experience problems when the RSS feed date has no offset and the system locales are set to en_US: RSS Feed date: Mon, 4 Jan 2010 02:14:00 CST

getDateModified returns: Apr 1, 2010 3:00:54 PM

the same date with locales de_DE returns the correct date, but an incorrect time, the current system time is used. RSS Feed date: Mon, 4 Jan 2010 02:14:00 CST

getDateModified returns: 04.01.2010 15:05:52 I've applied the patch from ZF7908 which fixes this problem: getDateModified returns: 04.01.2010 09:14:00

Using ZendFrameword 1.9.6 with these locales: LANG=en_US.UTF-8 LC_CTYPE="en_US.UTF-8" LC_NUMERIC="en_US.UTF-8" LC_TIME="en_US.UTF-8" LC_COLLATE="en_US.UTF-8" LC_MONETARY="en_US.UTF-8" LC_MESSAGES="en_US.UTF-8" LC_PAPER="en_US.UTF-8" LC_NAME="en_US.UTF-8" LC_ADDRESS="en_US.UTF-8" LC_TELEPHONE="en_US.UTF-8" LC_MEASUREMENT="en_US.UTF-8" LC_IDENTIFICATION="en_US.UTF-8" LC_ALL=

Comments

I'm experiencing the same exact problem here, with the feed http://feeds.slate.com/slate.

Here's a debug output from my code. The first field is whether getDateModified() is valid, the second is the actual getDateModified() in ISO_8601 format, followed by the entry title. Notice the alternating correct and wrong dates. (The actual RSS entries have pubDates corresponding to 2010-03-04, e.g. Thu, 4 Mar 2010 18:19:05 PST).

TRUE, 2010-03-04T08:29:03-08:00, Slate V: Dana's Home Theater: A Serious Man TRUE, 2010-04-03T20:32:10-04:00, Alice in Wonderland reviewed: Don't follow Tim Burton down this rabbit hole. TRUE, 2010-03-04T20:32:10-05:00, A real-life soldier says The Hurt Locker is based on his life. How will the court decide? TRUE, 2010-04-03T20:32:10-04:00, Obama held only one health care event in his first four months in office? TRUE, 2010-03-04T20:32:10-05:00, The Political Gabfest for March 4, 2010. TRUE, 2010-04-03T20:32:10-04:00, How to understand late-period Steve Martin. TRUE, 2010-04-03T20:32:10-04:00, Advertisement: TRUE, 2010-03-04T20:32:10-05:00, Why pledges to "clean up Washington" never work. TRUE, 2010-04-03T20:32:10-04:00, The Senate bill doesn't fund abortions. Here's why Stupak thinks it does. TRUE, 2010-03-04T20:32:10-05:00, Apple's multitouch lawsuit is both dumb and dangerous.

This is the RSS feed that I mentioned in my comment.

OK, I'll try this again (sorry first time here). The attached file slate.xml refers to my first comment. See the , and compare to the getDateModified() results in my first comment.

Resolved in r22086. Thanks for the detailed report and findings. They made all the difference in getting this reproduced and the patch justified.