-
-
Notifications
You must be signed in to change notification settings - Fork 31
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Adjust use of deprecated DateTimeType::getZonedDateTime
method in time::toZDT
#404
Comments
@florian-h05 - actually there is one thing we can do without breaking anything. so we could do something like (probably I'm mixing Java and JavaScript, but you get the idea): return javaZDTToJsZDT(rawState.getInstant().atZone(time.ZoneId.systemDefault())); Preferably using time-zone from WDYT? |
If getInstant is available long enough, this is a good solution 👍 Just noting that we need to use the time zone from the timeZoneProvider because we are dealing with Java ZDT here. |
It was introduced in openhab/openhab-core#3287 and is there to stay. 🙂
Sure, I will give it a go. 👍 Side comment: I plan to also have a look if we can provide more |
Resolves openhab#404 Signed-off-by: Jacob Laursen <jacob-github@vindvejr.dk>
Resolves openhab#404 Signed-off-by: Jacob Laursen <jacob-github@vindvejr.dk>
DateTimeType::getZonedDateTime
method in time::toZDT
DateTimeType::getZonedDateTime
method in time::toZDT
…Time` (#408) Related to openhab/openhab-core#3583. Resolves #404. This removes usages of the deprecated `DateTimeType` method [getZonedDateTime()](https://www.openhab.org/javadoc/latest/org/openhab/core/library/types/datetimetype#getZonedDateTime()) and instead applies the time-zone configured in openHAB. Signed-off-by: Jacob Laursen <jacob-github@vindvejr.dk>
Due to openhab/openhab-core#3583,
it is required to adjust
openhab-js/src/time.js
Line 189 in 5ebf646
and
openhab-js/src/time.js
Line 294 in 5ebf646
to
DateTimeType.getZonedDateTime(zoneId)
.This however cannot be done without breaking backwards compatibility with openHAB < 4.3, so we have to postpone this change to the next breaking openhab-js release.
The text was updated successfully, but these errors were encountered: