Details
-
Type:
Bug
-
Status:
Resolved
-
Priority:
Major
-
Resolution: Fixed
-
Affects Version/s: 1.9.2
-
Fix Version/s: 1.9.3
-
Component/s: Zend_Feed_Reader
-
Labels:None
Description
I have the following date in a RSS feed:
Sun, 11 Jan 2009 09:55:59 GMT
The getDateModified function in Zend_Feed_Reader_Entry_Rss returns a Zend_Date object corresponding to:
Sun, 01 Nov 2009 09:55:59 +0000
Expected result:
Sun, 11 Jan 2009 09:55:59 +0000
This is a month/day inversion (m-d-Y is US standard, d-m-Y is EU standard).
As it looks like php's builtin strtotime function understands/translates the date string properly, I propose to first try a strtotime conversion before attempting a Zend_Date resolution using RFC standards.
(updated 2009-09-21 16:46 UTC) Proposed working patch for Zend/Feed/Reader/Entry/Rss.php (rev 16966, Zend Framework v1.9.2):
256a257
>
257a259,262
> $dateModifiedParsed = strtotime($dateModified);
> if ($dateModifiedParsed) {
> $date = new Zend_Date($dateModifiedParsed);
> } else {
277a283
> }
Rss.php patch file