From b724595c2a6ff91ca2cceef33d593af0369e8776 Mon Sep 17 00:00:00 2001 From: Jacob Laursen Date: Tue, 10 Dec 2024 21:43:55 +0100 Subject: [PATCH] Simplify DateTimeType handling for DWD Pollenflug Signed-off-by: Jacob Laursen --- .../binding/dwdpollenflug/internal/dto/DWDPollenflug.java | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/bundles/org.openhab.binding.dwdpollenflug/src/main/java/org/openhab/binding/dwdpollenflug/internal/dto/DWDPollenflug.java b/bundles/org.openhab.binding.dwdpollenflug/src/main/java/org/openhab/binding/dwdpollenflug/internal/dto/DWDPollenflug.java index 05cebdeb915..baeddc1f38e 100644 --- a/bundles/org.openhab.binding.dwdpollenflug/src/main/java/org/openhab/binding/dwdpollenflug/internal/dto/DWDPollenflug.java +++ b/bundles/org.openhab.binding.dwdpollenflug/src/main/java/org/openhab/binding/dwdpollenflug/internal/dto/DWDPollenflug.java @@ -16,8 +16,6 @@ import static org.openhab.binding.dwdpollenflug.internal.DWDPollenflugBindingCon import java.text.ParseException; import java.text.SimpleDateFormat; -import java.time.ZoneId; -import java.time.ZonedDateTime; import java.util.Collections; import java.util.Date; import java.util.HashMap; @@ -91,8 +89,7 @@ public class DWDPollenflug { if (date == null) { return UnDefType.NULL; } else { - ZonedDateTime zoned = ZonedDateTime.ofInstant(date.toInstant(), ZoneId.systemDefault()); - return new DateTimeType(zoned); + return new DateTimeType(date.toInstant()); } }