ttscoff/Slogger — pull request #126 by scoop (2013-03-11 08:31:43+00:00)
Title: Fix date extraction when only an updated date has been recognized

As per our [Twitter conversation last night](https://twitter.com/ttscoff/status/310894313179594752), here's a pull request to fix the bug that Slogger would always grab all posts from the feed, even when run with a "today" timespan while it did slot the posts into their respective day journals properly.

It turns out that the RSS module fails to recognize the `published` nodes in the Atom feed and thus doesn't return them with `item.date`. As such, `Time.parse` runs with an empty string which happens to yield a `Time` object set to the current date.

I've modified the `begin/rescue` block slightly to run the same line on the two nodes (`date` and `updated`) in succession, which fixes the bug for me. The failback now is the current time again, so if neither `date` nor `updated` is properly recognized you'd end up with duplicate entries again. It could be debated whether the fallback should be `1970-01-01 00:00:00` instead to fail the "today" check, but I guess there is no right answer.

PS: I also took the liberty to fix the parse error due to a missing bracket in the plugin description.