-
-
Notifications
You must be signed in to change notification settings - Fork 3.6k
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
Simplify DateTimeType
handling
#17725
Conversation
86ec8a2
to
d397b88
Compare
2a79387
to
9940eec
Compare
315137b
to
b3209c5
Compare
d7d358e
to
adc97e5
Compare
Signed-off-by: Jacob Laursen <[email protected]>
Signed-off-by: Jacob Laursen <[email protected]>
Signed-off-by: Jacob Laursen <[email protected]>
Signed-off-by: Jacob Laursen <[email protected]>
Signed-off-by: Jacob Laursen <[email protected]>
Signed-off-by: Jacob Laursen <[email protected]>
Signed-off-by: Jacob Laursen <[email protected]>
Signed-off-by: Jacob Laursen <[email protected]>
Signed-off-by: Jacob Laursen <[email protected]>
Signed-off-by: Jacob Laursen <[email protected]>
Signed-off-by: Jacob Laursen <[email protected]>
Signed-off-by: Jacob Laursen <[email protected]>
Signed-off-by: Jacob Laursen <[email protected]>
Signed-off-by: Jacob Laursen <[email protected]>
Signed-off-by: Jacob Laursen <[email protected]>
Signed-off-by: Jacob Laursen <[email protected]>
Signed-off-by: Jacob Laursen <[email protected]>
Signed-off-by: Jacob Laursen <[email protected]>
8dc387a
to
a525c1c
Compare
Just a small reminder about this suggestion, did you consider it @lsiepel? |
Yes, i think that is the best. As you where still adding changes, i waited. Does it mean this PR is finished now? |
Sorry about that - I found a few more places. 😉 In the last iteration, I was searching for "new DateTimeType(" looking for places where I probably missed a few, but I think the PR is ready to be merged now. |
@lsiepel - thanks for the review, I know it was quite a lot of files. |
back ported commit for Network binding. (i can't set a patch anywhere, so i leave this message here) |
This is a cleanup only and does not change functionality when openhab/openhab-core#3583 has first been merged. The core PR discards time-zone from
DateTimeType
, thus binding code can be simplified:ZonedDateTime
using either time-zone fromTimeZoneProvider
orZoneId.systemDefault()
have been simplified to useInstant
. In some cases this entirely eliminated the need forTimeZoneProvider
, which has then been removed.toZone
andtoLocaleZone
have been removed.getZonedDateTime()
have been removed. In cases where time-zone is needed,getZonedDateTime(ZoneId.systemDefault())
is now explicitly called.Related to openhab/openhab-core#3583