Skip to content

Commit

Permalink
[remoteopenhab] Fix the pattern to parse DateTime (openhab#13349)
Browse files Browse the repository at this point in the history
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 <lg.hc@free.fr>
  • Loading branch information
lolodomo authored and leifbladt committed Oct 15, 2022
1 parent 83c2363 commit 4a555dd
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 4a555dd

Please sign in to comment.