From 85ecc85492834649076d957873e715c367a10084 Mon Sep 17 00:00:00 2001 From: milulaci Date: Thu, 13 Jul 2017 14:41:10 +0200 Subject: [PATCH] fixed bug that would crash the application because of using different locale --- .../src/main/java/hamargyuri/rss_notifier/model/RSSItem.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/MyApplication/app/src/main/java/hamargyuri/rss_notifier/model/RSSItem.java b/MyApplication/app/src/main/java/hamargyuri/rss_notifier/model/RSSItem.java index 79f8e6f..71c0b96 100644 --- a/MyApplication/app/src/main/java/hamargyuri/rss_notifier/model/RSSItem.java +++ b/MyApplication/app/src/main/java/hamargyuri/rss_notifier/model/RSSItem.java @@ -7,6 +7,7 @@ import java.text.ParseException; import java.text.SimpleDateFormat; import java.util.Date; +import java.util.Locale; /** * Created by hamargyuri on 2017. 06. 05.. @@ -25,7 +26,7 @@ public class RSSItem { private String description; public Date getParsedDate() { - DateFormat format = new SimpleDateFormat("EEE, d MMM yyyy HH:mm:ss Z"); + DateFormat format = new SimpleDateFormat("EEE, d MMM yyyy HH:mm:ss Z", Locale.US); try { return format.parse(dateString); } catch (ParseException e) {