diff --git a/omnipod/src/test/java/info/nightscout/androidaps/plugins/pump/omnipod/driver/util/TimeUtilTest.java b/omnipod/src/test/java/info/nightscout/androidaps/plugins/pump/omnipod/driver/util/TimeUtilTest.java index 49ee7c02ba..6165de683d 100644 --- a/omnipod/src/test/java/info/nightscout/androidaps/plugins/pump/omnipod/driver/util/TimeUtilTest.java +++ b/omnipod/src/test/java/info/nightscout/androidaps/plugins/pump/omnipod/driver/util/TimeUtilTest.java @@ -1,7 +1,5 @@ package info.nightscout.androidaps.plugins.pump.omnipod.driver.util; -import net.danlew.android.joda.JodaTimeAndroid; - import org.joda.time.DateTime; import org.joda.time.DateTimeZone; import org.junit.Before; @@ -38,6 +36,13 @@ public class TimeUtilTest { assertEquals(83101, TimeUtil.toDuration(dateTime).getStandardSeconds()); } + @Test + public void testDateTimeInOtherZone() { + DateTime dateTime = new DateTime(2020, 3, 29, 23, 5, 1, DateTimeZone.forID("America/Los_Angeles")); + + assertEquals(83101, TimeUtil.toDuration(dateTime).getStandardSeconds()); + } + @Test public void testDateTimeToDurationWithNullDateTime() { IllegalArgumentException ex = assertThrows(IllegalArgumentException.class, () -> TimeUtil.toDuration(null));