From baf7ec6c2aae18155d524de9bf274ef94e2a2a21 Mon Sep 17 00:00:00 2001 From: Jacob Laursen Date: Tue, 10 Dec 2024 21:53:11 +0100 Subject: [PATCH] Simplify DateTimeType handling for Feed Signed-off-by: Jacob Laursen --- .../openhab/binding/feed/internal/handler/FeedHandler.java | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/bundles/org.openhab.binding.feed/src/main/java/org/openhab/binding/feed/internal/handler/FeedHandler.java b/bundles/org.openhab.binding.feed/src/main/java/org/openhab/binding/feed/internal/handler/FeedHandler.java index db0be0b7c4d..6e76236a082 100644 --- a/bundles/org.openhab.binding.feed/src/main/java/org/openhab/binding/feed/internal/handler/FeedHandler.java +++ b/bundles/org.openhab.binding.feed/src/main/java/org/openhab/binding/feed/internal/handler/FeedHandler.java @@ -21,8 +21,6 @@ import java.math.BigDecimal; import java.net.MalformedURLException; import java.net.URL; import java.net.URLConnection; -import java.time.ZoneId; -import java.time.ZonedDateTime; import java.util.Date; import java.util.List; import java.util.concurrent.ScheduledFuture; @@ -184,8 +182,7 @@ public class FeedHandler extends BaseThingHandler { return; } else { Date date = latestEntry.getPublishedDate(); - ZonedDateTime zdt = ZonedDateTime.ofInstant(date.toInstant(), ZoneId.systemDefault()); - state = new DateTimeType(zdt); + state = new DateTimeType(date.toInstant()); } break; case CHANNEL_AUTHOR: