I try to show some dates in an oh3-widget by parsing a string with the dayjs-integration. But I can’t get it to work to show the right date-time.
My String Item stores following example string (length varies, structure always the same, splitting by ‘_’):
In the oh3-widget I created an oh-repeater component which iterates over an array, which I create by
When I leave the `[Europe/Berlin]’ part in the String, the dayJS can’t create a proper date-time representation.
If I remove the `[Europe/Berlin]’ part in the String, the dayJS creates a proper date-time representation, but in the wrong TimeZone (GMT). My host system is running in TimeZone UTC+2 and the Docker-Container (witch serves openHAB) gets the TimeZone from the host system. I checked in the Docker-Container - TimeZone is CEST. So the timezones are the same…
- Given String:
- Inject into dayJS in oh3-widget: not possible to create date-time representation
- Remove content between
- Inject into dayJS in oh3-widget: wrong TimeZone representation (it gets GMT)
- Host system and Docker-Container have CEST (UTC+2)
- How to properly parse ZonedDateTime.toString with dayJS to get proper DateTime representation in oh3-widget