New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[core] Use Instant
internally for DateTimeType
#3583
base: main
Are you sure you want to change the base?
Conversation
ab14428
to
81c3dc0
Compare
I hit a wall with this when realizing that I don't know if any @openhab/webui-maintainers can throw some light at what may be a possible way forward? |
4ec7437
to
229ee4e
Compare
Signed-off-by: Jacob Laursen <jacob-github@vindvejr.dk>
229ee4e
to
266b055
Compare
@mherwege - seeing your work in #4169 I'm wondering if you can advise how to accomplish decoupling the time-zone + formatting of Currently it's formatted like this: |
@jlaur Main UI works with what it gets from the REST API.
The formatted state comes from the
So, to understand where Line 953 in cbb458e
state is added through the EnrichedItemDTOMapper here: Line 81 in cbb458e
So it is simply using the toFullString() method on the state of the item.
|
@mherwege - many thanks for your insights. I will have a closer look at this soon. |
Draft proposal for switching
DateTimeType
to useInstant
internally rather thanZonedDateTime
.This will effectively strip time-zone information from the source of the
DateTimeType
and leave it to consumers to apply time-zone at the moment of presentation, according to the configured time-zone in openHAB regional settings or in the browser.Example DSL rule:
Previous result with system time-zone CET/DST:
New result with same system time-zone:
Resolves #2898