Needs review
Project:
FeedAPI
Version:
5.x-1.0
Component:
Code
Priority:
Normal
Category:
Task
Assigned:
Reporter:
Created:
20 Feb 2008 at 22:05 UTC
Updated:
8 Feb 2012 at 12:28 UTC
As far as I've tested, this problem exist for every feed coming out of Yahoo Finance (general news and stock headlines). Instead of listing the actual published time for each item it lists the time each item was aggregated, so all items end up having the same timestamps. The problem is the same for aggregator.module(core). I thought there was a problem with the feeds but I checked the source and the pubDate is fine, and they work perfectly in Google reader too. Strange thing is every other sites feeds work fine...
Any clue?
Comments
Comment #1
aron novakThanks for the report. This is not FeedAPI's fault. (google reader simply tries to handle bogus date formats) The feed is not valid: http://validator.w3.org/feed/check.cgi?url=http%3A%2F%2Ffinance.yahoo.co...
I tried to get the timestamp, but currently, without definite success.
If someone could help here, feedapi will support insane date formats in RSS feeds.
Here I'm now:
The first is one of the date strings from yahoo finance feeds. Currently the mktime returns null. I'm sure that the $format is not perfect at the moment. Any suggestion?
Comment #2
ekes commentedThe problem is %Z - this just refers to the Timezone in the abbreviation format used by strftime (which won't be ANSI standard X3.51-1975 as per RFC822 either - which very USA centric date standard).
The date module for example deals with this using a /long/ list of timezones and offsets (date_timezones.inc) this seems to be the most common method. Maybe requiring the DateAPI for date parsing isn't such an unfair thing?
Comment #3
mstef commentedThank you, but you do not have to go through all of this trouble just for me.
Comment #4
aron novakWell, it's not just about you. Unfortunately Yahoo Finance is a too big and important site to ignore. I'd like to see such a frugal date handling in FeedAPI as in Google reader :)
Comment #5
kevin70 commentedHi, this is Kevin From Alaska and i heard about this site and i this gonna to be very helpful for us and , and i also enjoy the privileges of this site.
=========================================
kevin
http://mls.fastrealestate.net
Comment #6
gsnedders commentedYou want to allow any leading or trailing garbage: the "E" will be taken as a military zone (RFC 822 incorrectly defines these, and RFC 2822 which obsolete it defines them all to be equal to ±0000).