From 8df750897f634c6b576fe33b5d4bdea5bb74ae2b Mon Sep 17 00:00:00 2001 From: Karel Goderis Date: Sun, 11 Jun 2023 12:15:23 +0200 Subject: [PATCH] [knx] Fix DPT 10 handling (#15082) Signed-off-by: Karel Goderis Signed-off-by: Thomas Burri --- .../org/openhab/binding/knx/internal/dpt/ValueDecoder.java | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/bundles/org.openhab.binding.knx/src/main/java/org/openhab/binding/knx/internal/dpt/ValueDecoder.java b/bundles/org.openhab.binding.knx/src/main/java/org/openhab/binding/knx/internal/dpt/ValueDecoder.java index b94f0ac166487..6364aeba3e396 100644 --- a/bundles/org.openhab.binding.knx/src/main/java/org/openhab/binding/knx/internal/dpt/ValueDecoder.java +++ b/bundles/org.openhab.binding.knx/src/main/java/org/openhab/binding/knx/internal/dpt/ValueDecoder.java @@ -215,8 +215,11 @@ private static Type handleDpt10(String value) throws ParseException { try { date = new SimpleDateFormat(TIME_DAY_FORMAT, Locale.US).parse(value); } catch (ParseException pe) { - date = new SimpleDateFormat(TIME_FORMAT, Locale.US).parse(value); - throw pe; + try { + date = new SimpleDateFormat(TIME_FORMAT, Locale.US).parse(value); + } catch (ParseException pe2) { + throw pe2; + } } return DateTimeType.valueOf(new SimpleDateFormat(DateTimeType.DATE_PATTERN).format(date)); }