I made some simple updates to the aggregator.module and the default xtemplate styles on integrationresearch.org/aggregator and thought I'd share:
The first issue was the handling of date values. The original code admitted (line 434):
** The Dublin core's default data format uses ISO 8601 which can't
** be parsed directly using PHP's strtotime(). It is not the only
** valid format so this might fail nonetheless ...
I had one feed that indeed used a different format than expected, and all its entries were hence given the current date and time. This put all 15 entries at the top of the page, pushing more relevant/recent entries down. But I noticed that at least the yyyy-mm-dd format at the front of the date field was consistent, so I added this bit of code to grab just the date, and assigned it 00:00:00 time. I don't know how many feeds this will "fix," but it worked for the feed in question and I bet it will for others that "break" the date formatter as well. Addition in bold:
if ($timestamp < 0) {
/*
** The Dublin core's default data format uses ISO 8601 which can't
** be parsed directly using PHP's strtotime(). It is not the only
** valid format so this might fail nonetheless ...
*/
list($year, $month, $day, $hour, $minute, $second) = sscanf($date, "%4d-%2d-%2dT%2d:%2d:%2d");