-
-
Notifications
You must be signed in to change notification settings - Fork 30
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
js-joda time.ZonedDateTime.now() is returning America/Mexico with DST although the country stopped using it #326
Comments
I have updated JS-Joda to the latest version with version 4.9.0 of openhab-js. Can you please upgrade openhab-js to the latest version (4.9.0)? If the issue persists, please file an issue at https://github.com/js-joda/js-joda/issues and link it here, so we have the reference. |
Upgrading openhab-js did not solve the issue. reference to the report in js-joda git. |
Joda's git answer:
|
Can you please check if you have disabled injection caching? Otherwise the add-on will not use the manually installed openhab-js, but the bundled one. We are using timezones package version 2.18.3, so I guess it’s an issue with your installation not using the latest version. |
Please put |
Ok, something went wrong with the update... I have 4.7.3 and I'm getting a permission error (Although yesterday the "update" seems ok) Let me check again what's wrong. |
Nope. Now on 4.9.0 and the
|
I guess the second timestamp is from Java DateTime, the first is JS-Joda. Can you please check the result of this? time.ZonedDateTime.now(time.ZoneId.of("America/Mexico_City")); |
Sure! Running this:
returns the right UTC (-6) Except for [System] with
|
Hmm, the problem we have with openhab-js is, that we don’t know the timezone the user is in, therefore we default to SYSTEM. openHAB‘s Java part knows your timezone because you set it in the settings I guess. Which OS has your openHAB host? Which timezone setting and which time does it show? |
Ubuntu (Xubuntu) 22.04.4: (At 10:19 local time)
|
The block
now
in rules is returning the time in DST for Mexico (UTC-5) since the first Sunday of April, although the country stopped using it last year. The system time (Ubuntu, all up to date) is OK and javatime.ZoneDateTime.now()
returns the correct time (UTC-6)Expected Behavior
now
should return UTC-6 for Mexico since we are not using DST anymore.Current Behavior
now
is returning UTC-5Possible Solution
According with Rich Koshak in the community forum, maybe check and upgrade the version of js-coda.
Steps to Reproduce (for Bugs)
now
blockContext
The block is use as a condition in a rule that now is triggering 1 hour before it should.
Your Environment
The text was updated successfully, but these errors were encountered: