diff --git a/bundles/org.openhab.binding.dbquery/src/main/java/org/openhab/binding/dbquery/internal/Value2StateConverter.java b/bundles/org.openhab.binding.dbquery/src/main/java/org/openhab/binding/dbquery/internal/Value2StateConverter.java index 57bcaef4ddd..24d2ccd96be 100644 --- a/bundles/org.openhab.binding.dbquery/src/main/java/org/openhab/binding/dbquery/internal/Value2StateConverter.java +++ b/bundles/org.openhab.binding.dbquery/src/main/java/org/openhab/binding/dbquery/internal/Value2StateConverter.java @@ -16,8 +16,6 @@ import java.math.BigDecimal; import java.math.BigInteger; import java.time.Duration; import java.time.Instant; -import java.time.ZoneId; -import java.time.ZonedDateTime; import java.util.Base64; import java.util.Date; @@ -76,9 +74,9 @@ public class Value2StateConverter { private State convert2DateTime(Object value) { if (value instanceof Instant instant) { - return new DateTimeType(ZonedDateTime.ofInstant(instant, ZoneId.systemDefault())); + return new DateTimeType(instant); } else if (value instanceof Date date) { - return new DateTimeType(ZonedDateTime.ofInstant(date.toInstant(), ZoneId.systemDefault())); + return new DateTimeType(date.toInstant()); } else if (value instanceof String string) { return new DateTimeType(string); } else {