summaryrefslogtreecommitdiff
path: root/core/src/androidTest
diff options
context:
space:
mode:
authorMartin Fietz <Martin.Fietz@gmail.com>2015-06-21 15:43:14 +0200
committerMartin Fietz <Martin.Fietz@gmail.com>2015-06-21 15:43:14 +0200
commit80c719d432d2bc2441a3adeefe542e45af6575da (patch)
treee6656b8502a626d45f3e335d6b2dfc04305450ff /core/src/androidTest
parente1b494ba0577ce2cb60e6b3120e3534fb1f3211c (diff)
downloadAntennaPod-80c719d432d2bc2441a3adeefe542e45af6575da.zip
Fix datetime parsing (seconds absent)
Diffstat (limited to 'core/src/androidTest')
-rw-r--r--core/src/androidTest/java/de/danoeh/antennapod/core/tests/util/DateUtilsTest.java8
1 files changed, 8 insertions, 0 deletions
diff --git a/core/src/androidTest/java/de/danoeh/antennapod/core/tests/util/DateUtilsTest.java b/core/src/androidTest/java/de/danoeh/antennapod/core/tests/util/DateUtilsTest.java
index 2a2d6414a..7429b50b3 100644
--- a/core/src/androidTest/java/de/danoeh/antennapod/core/tests/util/DateUtilsTest.java
+++ b/core/src/androidTest/java/de/danoeh/antennapod/core/tests/util/DateUtilsTest.java
@@ -66,6 +66,14 @@ public class DateUtilsTest extends AndroidTestCase {
assertEquals(expected, actual);
}
+ public void testParseDateWithTimezoneName2() throws Exception {
+ GregorianCalendar exp = new GregorianCalendar(2015, 2, 28, 6, 31, 0);
+ exp.setTimeZone(TimeZone.getTimeZone("UTC"));
+ Date expected = new Date(exp.getTimeInMillis());
+ Date actual = DateUtils.parse("Sat, 28 Mar 2015 01:31 EST");
+ assertEquals(expected, actual);
+ }
+
public void testParseDateWithTimeZoneOffset() throws Exception {
GregorianCalendar exp = new GregorianCalendar(2015, 2, 28, 12, 16, 12);
exp.setTimeZone(TimeZone.getTimeZone("UTC"));