{"action":"created","issue":{"url":"https://api.github.com/repos/podverse/podverse/issues/49","labels_url":"https://api.github.com/repos/podverse/podverse/issues/49/labels{/name}","comments_url":"https://api.github.com/repos/podverse/podverse/issues/49/comments","events_url":"https://api.github.com/repos/podverse/podverse/issues/49/events","html_url":"https://github.com/podverse/podverse/issues/49","id":118747835,"number":49,"title":"Feedparser - Fails to retrieve a date from episodes when the date format ends with a three letter timezone (e.g. PST)","user":{"login":"mitchdowney","id":2262919,"avatar_url":"https://avatars.githubusercontent.com/u/2262919?v=3","gravatar_id":"","url":"https://api.github.com/users/mitchdowney","html_url":"https://github.com/mitchdowney","followers_url":"https://api.github.com/users/mitchdowney/followers","following_url":"https://api.github.com/users/mitchdowney/following{/other_user}","gists_url":"https://api.github.com/users/mitchdowney/gists{/gist_id}","starred_url":"https://api.github.com/users/mitchdowney/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mitchdowney/subscriptions","organizations_url":"https://api.github.com/users/mitchdowney/orgs","repos_url":"https://api.github.com/users/mitchdowney/repos","events_url":"https://api.github.com/users/mitchdowney/events{/privacy}","received_events_url":"https://api.github.com/users/mitchdowney/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/podverse/podverse/labels/priority","name":"priority","color":"fbca04"}],"state":"open","locked":false,"assignee":{"login":"kreonjr","id":5912405,"avatar_url":"https://avatars.githubusercontent.com/u/5912405?v=3","gravatar_id":"","url":"https://api.github.com/users/kreonjr","html_url":"https://github.com/kreonjr","followers_url":"https://api.github.com/users/kreonjr/followers","following_url":"https://api.github.com/users/kreonjr/following{/other_user}","gists_url":"https://api.github.com/users/kreonjr/gists{/gist_id}","starred_url":"https://api.github.com/users/kreonjr/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kreonjr/subscriptions","organizations_url":"https://api.github.com/users/kreonjr/orgs","repos_url":"https://api.github.com/users/kreonjr/repos","events_url":"https://api.github.com/users/kreonjr/events{/privacy}","received_events_url":"https://api.github.com/users/kreonjr/received_events","type":"User","site_admin":false},"milestone":null,"comments":4,"created_at":"2015-11-25T02:39:53Z","updated_at":"2015-12-26T07:15:39Z","closed_at":null,"body":"I noticed this issue when subscribing to the Dan Carlin Hardcore History podcast. All of the episodes are appearing in the EpisodeTableViewController in reverse chronological order. \r\n\r\nThe episodes are failing to appear in chronological order in the EpisodeTableViewController because the FeedParser does not correctly grab the pubDate of the DCHH podcast. When the FeedParser fails to grab a pubDate, it defaults to setting the pubDate as the current date (for all the episodes).\r\n\r\nSo the format of the pubDate in the [DCHH RSS Feed](http://feeds.feedburner.com/dancarlin/history?format=xml) (view source of that page) looks like this:\r\n\r\n<pubDate>Tue, 05 May 2015 23:57:12 PST</pubDate>\r\n\r\nAfter investigating the NSDate+FeedsDate.swift file (which is responsible for formating the FeedParser's dates), I can see that when parsing the DCHH feed the NSDate+FeedsDate fails in line 52 to recognize DCHH's pubDate as a valid date format because the DCHH pubDate does not end with the letter \"Z\".\r\n\r\n(Apparently three letter time zones like PST or MST or CST or EST are according to web standards supposed to have a Z at the end of their pubDate? DCHH doesn't have a Z, and it doesn't match the other expected date formats, so retrieveDateFromDateString in FeedParser.swift defaults to the current date.)\r\n\r\nI dunno how to solve this one right now. It's very low priority so I'm moving on..."},"comment":{"url":"https://api.github.com/repos/podverse/podverse/issues/comments/167291961","html_url":"https://github.com/podverse/podverse/issues/49#issuecomment-167291961","issue_url":"https://api.github.com/repos/podverse/podverse/issues/49","id":167291961,"user":{"login":"mitchdowney","id":2262919,"avatar_url":"https://avatars.githubusercontent.com/u/2262919?v=3","gravatar_id":"","url":"https://api.github.com/users/mitchdowney","html_url":"https://github.com/mitchdowney","followers_url":"https://api.github.com/users/mitchdowney/followers","following_url":"https://api.github.com/users/mitchdowney/following{/other_user}","gists_url":"https://api.github.com/users/mitchdowney/gists{/gist_id}","starred_url":"https://api.github.com/users/mitchdowney/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mitchdowney/subscriptions","organizations_url":"https://api.github.com/users/mitchdowney/orgs","repos_url":"https://api.github.com/users/mitchdowney/repos","events_url":"https://api.github.com/users/mitchdowney/events{/privacy}","received_events_url":"https://api.github.com/users/mitchdowney/received_events","type":"User","site_admin":false},"created_at":"2015-12-26T07:15:39Z","updated_at":"2015-12-26T07:15:39Z","body":"It appears that the NSDate+FeedsDate.swift from the FeedParser library we are using does not account for all possible DateFormats.\r\n\r\nI implemented changes to the NSDate+FeedsDate.swift file based on [this SO answer](http://stackoverflow.com/a/19118926). Dan Carlin's podcasts are now correctly retrieving and saving dates.\r\n\r\nI dunno yet if I broke another podcast's dates with this method...but all the podcasts I tested seem to be working with this new method. I pushed the fix to the branch fixEpisodeDates."}}