From 5f7a984d8849b3c22b8952ff9eb42a5792c4dd02 Mon Sep 17 00:00:00 2001 From: daniel oeh Date: Wed, 18 Jul 2012 17:34:43 +0200 Subject: [PATCH] Dateparser should now be more stable --- .../danoeh/antennapod/syndication/util/SyndDateUtils.java | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/de/danoeh/antennapod/syndication/util/SyndDateUtils.java b/src/de/danoeh/antennapod/syndication/util/SyndDateUtils.java index 226a79721..00f77d65a 100644 --- a/src/de/danoeh/antennapod/syndication/util/SyndDateUtils.java +++ b/src/de/danoeh/antennapod/syndication/util/SyndDateUtils.java @@ -45,9 +45,12 @@ public class SyndDateUtils { e.printStackTrace(); format.applyPattern(RFC822); try { - result = format.parse(date); + result = format.parse(date); } catch (ParseException e1) { e1.printStackTrace(); + Log.e(TAG, "Unable to parse feed date correctly"); + } finally { + format.applyPattern(RFC822DAY); // apply old pattern again } } @@ -77,6 +80,9 @@ public class SyndDateUtils { result = format.parse(bufStr); } catch (ParseException e) { e.printStackTrace(); + Log.e(TAG, "Unable to parse date"); + } finally { + format.applyPattern(RFC3339UTC); } }