diff options
author | Martin Fietz <Martin.Fietz@gmail.com> | 2015-06-21 15:43:14 +0200 |
---|---|---|
committer | Martin Fietz <Martin.Fietz@gmail.com> | 2015-06-21 15:43:14 +0200 |
commit | 80c719d432d2bc2441a3adeefe542e45af6575da (patch) | |
tree | e6656b8502a626d45f3e335d6b2dfc04305450ff /core/src/androidTest | |
parent | e1b494ba0577ce2cb60e6b3120e3534fb1f3211c (diff) | |
download | AntennaPod-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.java | 8 |
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")); |