Skip to content

Commit 516acfe

Browse files
authored
Update accepted DateTimeType format (openhab#2362)
Signed-off-by: Jimmy Tanagra <[email protected]>
1 parent 31007ff commit 516acfe

File tree

1 file changed

+10
-7
lines changed

1 file changed

+10
-7
lines changed

concepts/items.md

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -61,13 +61,16 @@ For available Group functions and examples see [Configuration Guide](../configur
6161

6262
### DateTimeType
6363

64-
`DateTimeType` objects are parsed using Java's `SimpleDateFormat.parse()` using the first matching pattern:
65-
66-
1. `yyyy-MM-dd'T'HH:mm:ss.SSSZ`
67-
1. `yyyy-MM-dd'T'HH:mm:ss.SSSz`
68-
1. `yyyy-MM-dd'T'HH:mm:ss.SSSX`
69-
1. `yyyy-MM-dd'T'HH:mm:ssz`
70-
1. `yyyy-MM-dd'T'HH:mm:ss`
64+
`DateTimeType` objects are parsed using Java's `DateTimeFormatter` with the first matching pattern:
65+
66+
1. `yyyy-MM-dd'T'HH:mm[:ss[.SSS]]Z` or `yyyy-MM-dd HH:mm[:ss[.SSS]]Z`
67+
1. `yyyy-MM-dd'T'HH:mm[:ss[.SSS]]X` or `yyyy-MM-dd HH:mm[:ss[.SSS]]X`
68+
1. `yyyy-MM-dd'T'HH:mm[:ss[.SSS]]z` or `yyyy-MM-dd HH:mm[:ss[.SSS]]z`
69+
1. `yyyy-MM-dd'T'HH:mm[:ss[.SSS]]` or `yyyy-MM-dd HH:mm[:ss[.SSS]]`
70+
1. `HH:mm[:ss[.SSS]]` with or without a timezone
71+
1. A string of fewer than 12 digits as epoch in seconds
72+
1. A string of 12 digits of more as epoch in milliseconds
73+
1. `yyyy-MM-dd` with or without a timezone
7174

7275
| Literal | Standard | Example |
7376
|---------|--------------------|---------------------------------------|

0 commit comments

Comments
 (0)