From df8f92e847e32be8fd110a6438d276fe21b285ac Mon Sep 17 00:00:00 2001 From: Jacob Laursen Date: Tue, 10 Dec 2024 21:49:32 +0100 Subject: [PATCH] Simplify DateTimeType handling for VisualCrossing Signed-off-by: Jacob Laursen --- .../openhab/binding/visualcrossing/internal/TypeBuilder.java | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/bundles/org.openhab.binding.visualcrossing/src/main/java/org/openhab/binding/visualcrossing/internal/TypeBuilder.java b/bundles/org.openhab.binding.visualcrossing/src/main/java/org/openhab/binding/visualcrossing/internal/TypeBuilder.java index ce2173535ef..11698ab6260 100644 --- a/bundles/org.openhab.binding.visualcrossing/src/main/java/org/openhab/binding/visualcrossing/internal/TypeBuilder.java +++ b/bundles/org.openhab.binding.visualcrossing/src/main/java/org/openhab/binding/visualcrossing/internal/TypeBuilder.java @@ -20,7 +20,6 @@ import static org.openhab.core.types.UnDefType.UNDEF; import java.math.BigDecimal; import java.time.Instant; -import java.time.ZoneId; import java.util.Collection; import java.util.function.Function; @@ -205,8 +204,7 @@ class TypeBuilder { return UNDEF; } var instant = Instant.ofEpochSecond(number.longValue()); - var zonedDateTime = instant.atZone(ZoneId.of("UTC")); - return new DateTimeType(zonedDateTime); + return new DateTimeType(instant); } public static State newDateTimeType(@Nullable T obj, Function function) {