From a8e2348d5a9a68f5dd8154fadb3fd7a5a58fc37d Mon Sep 17 00:00:00 2001 From: Jacob Laursen Date: Mon, 11 Nov 2024 20:28:16 +0100 Subject: [PATCH] Simplify DateTimeType handling for aWATTar Signed-off-by: Jacob Laursen --- .../org/openhab/binding/awattar/internal/AwattarUtil.java | 5 ----- .../awattar/internal/handler/AwattarBestPriceHandler.java | 6 +++--- 2 files changed, 3 insertions(+), 8 deletions(-) diff --git a/bundles/org.openhab.binding.awattar/src/main/java/org/openhab/binding/awattar/internal/AwattarUtil.java b/bundles/org.openhab.binding.awattar/src/main/java/org/openhab/binding/awattar/internal/AwattarUtil.java index e6ba28341c0..37ee5e66955 100644 --- a/bundles/org.openhab.binding.awattar/src/main/java/org/openhab/binding/awattar/internal/AwattarUtil.java +++ b/bundles/org.openhab.binding.awattar/src/main/java/org/openhab/binding/awattar/internal/AwattarUtil.java @@ -21,7 +21,6 @@ import javax.measure.quantity.Time; import org.eclipse.jdt.annotation.NonNullByDefault; import org.openhab.core.i18n.TimeZoneProvider; -import org.openhab.core.library.types.DateTimeType; import org.openhab.core.library.types.QuantityType; import org.openhab.core.library.unit.Units; @@ -47,10 +46,6 @@ public class AwattarUtil { return ZonedDateTime.now(zone).truncatedTo(ChronoUnit.DAYS).plusHours(hour); } - public static DateTimeType getDateTimeType(long time, TimeZoneProvider tz) { - return new DateTimeType(ZonedDateTime.ofInstant(Instant.ofEpochMilli(time), tz.getTimeZone())); - } - public static QuantityType