diff --git a/bundles/org.openhab.binding.deconz/src/test/java/org/openhab/binding/deconz/DeconzTest.java b/bundles/org.openhab.binding.deconz/src/test/java/org/openhab/binding/deconz/DeconzTest.java index e8eff1e7473..d17bd44e90c 100644 --- a/bundles/org.openhab.binding.deconz/src/test/java/org/openhab/binding/deconz/DeconzTest.java +++ b/bundles/org.openhab.binding.deconz/src/test/java/org/openhab/binding/deconz/DeconzTest.java @@ -19,8 +19,7 @@ import static org.mockito.Mockito.times; import java.io.IOException; import java.io.InputStream; import java.nio.charset.StandardCharsets; -import java.time.ZoneId; -import java.time.ZonedDateTime; +import java.time.Instant; import java.util.Map; import java.util.Objects; import java.util.Optional; @@ -119,10 +118,9 @@ public class DeconzTest { @Test public void dateTimeConversionTest() { DateTimeType dateTime = Util.convertTimestampToDateTime("2020-08-22T11:09Z"); - assertEquals(new DateTimeType(ZonedDateTime.parse("2020-08-22T11:09:00Z")), dateTime); + assertEquals(new DateTimeType(Instant.parse("2020-08-22T11:09:00Z")), dateTime); dateTime = Util.convertTimestampToDateTime("2020-08-22T11:09:47"); - assertEquals(new DateTimeType(ZonedDateTime.parse("2020-08-22T11:09:47Z")).toZone(ZoneId.systemDefault()), - dateTime); + assertEquals(new DateTimeType(Instant.parse("2020-08-22T11:09:47Z")), dateTime); } }