From 4dd0c6d580efa05e4b33f91de333a0b47485cd6a Mon Sep 17 00:00:00 2001 From: lolodomo Date: Tue, 6 Sep 2022 20:27:31 +0200 Subject: [PATCH] [remoteopenhab] Fix the pattern to parse DateTime (#13349) Re-use the same pattern as defined in class DateTimeTyoe. Allows the support of 0 to 9 digits after the seconds. Signed-off-by: Laurent Garnier --- .../internal/handler/RemoteopenhabBridgeHandler.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bundles/org.openhab.binding.remoteopenhab/src/main/java/org/openhab/binding/remoteopenhab/internal/handler/RemoteopenhabBridgeHandler.java b/bundles/org.openhab.binding.remoteopenhab/src/main/java/org/openhab/binding/remoteopenhab/internal/handler/RemoteopenhabBridgeHandler.java index 8729f8f703243..a7366e97247ea 100644 --- a/bundles/org.openhab.binding.remoteopenhab/src/main/java/org/openhab/binding/remoteopenhab/internal/handler/RemoteopenhabBridgeHandler.java +++ b/bundles/org.openhab.binding.remoteopenhab/src/main/java/org/openhab/binding/remoteopenhab/internal/handler/RemoteopenhabBridgeHandler.java @@ -98,7 +98,7 @@ public class RemoteopenhabBridgeHandler extends BaseBridgeHandler implements RemoteopenhabStreamingDataListener, RemoteopenhabItemsDataListener { - private static final String DATE_FORMAT_PATTERN = "yyyy-MM-dd'T'HH:mm:ss.SSSZ"; + private static final String DATE_FORMAT_PATTERN = "yyyy-MM-dd'T'HH:mm[:ss[.SSSSSSSSS][.SSSSSSSS][.SSSSSSS][.SSSSSS][.SSSSS][.SSSS][.SSS][.SS][.S]]Z"; private static final DateTimeFormatter FORMATTER_DATE = DateTimeFormatter.ofPattern(DATE_FORMAT_PATTERN); private static final int MAX_STATE_SIZE_FOR_LOGGING = 50;