-
-
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
[evcc] Fix charge plan time channel not using correct timezone #17640
Conversation
377ff72
to
3abbfd1
Compare
…#17620) Signed-off-by: Laith Budairi <laith.budairi@exalt.ps>
3abbfd1
to
34f5b27
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code LGTM, thanks!
I don‘t use the binding anymore, so would be good if someone in #17620 could verify the fix.
Tested it out with the issue owner, the fix seems to be working fine |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, LGTM
+ planTime.toLocalDateTime().format(DateTimeFormatter.ISO_LOCAL_DATE_TIME) + "Z", "POST"); | ||
ZoneId zoneId = timeZoneProvider.getTimeZone(); | ||
ZonedDateTime adjustedTime = planTime.withZoneSameInstant(zoneId); | ||
String formattedTime = adjustedTime.format(DateTimeFormatter.ISO_OFFSET_DATE_TIME); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@Laith-Budairi - out of curiosity, does the API support UTC time, e.g. 2024-10-24T05:30:00.636Z
? In this case, the fix could be as simple as:
String formattedTime = planTime.toInstant().toString();
And there would be no need to use TimeZoneProvider
.
…#17620) (openhab#17640) Signed-off-by: Laith Budairi <laith.budairi@exalt.ps>
…#17620) (openhab#17640) Signed-off-by: Laith Budairi <laith.budairi@exalt.ps>
…#17620) (openhab#17640) Signed-off-by: Laith Budairi <laith.budairi@exalt.ps> Signed-off-by: Ciprian Pascu <contact@ciprianpascu.ro>
Fixes #17620.
this change fixes the Charge Plan Time not showing correctly on EVCC.
jar file with fix: EVCC jar
Signed-off-by: Laith Budairi laith38@yahoo.com