Skip to content

Commit

Permalink
[knx] Fix DPT 10 handling (openhab#15082)
Browse files Browse the repository at this point in the history
Signed-off-by: Karel Goderis <karel.goderis@me.com>
Signed-off-by: Thomas Burri <thomas.burri@alstomgroup.com>
  • Loading branch information
kgoderis authored and tburri-alstom committed Jun 19, 2023
1 parent a7a4d2a commit 8df7508
Showing 1 changed file with 5 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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));
}
Expand Down

0 comments on commit 8df7508

Please sign in to comment.