mirror of
https://github.com/openhab/openhab-addons.git
synced 2025-01-10 15:11:59 +01:00
Simplify DateTimeType handling for Ecobee
Signed-off-by: Jacob Laursen <jacob-github@vindvejr.dk> Signed-off-by: Ciprian Pascu <contact@ciprianpascu.ro>
This commit is contained in:
parent
cff64b8148
commit
79c170d9f8
@ -14,7 +14,6 @@ package org.openhab.binding.ecobee.internal.handler;
|
||||
|
||||
import java.time.Instant;
|
||||
import java.time.LocalDateTime;
|
||||
import java.time.ZonedDateTime;
|
||||
|
||||
import javax.measure.Unit;
|
||||
import javax.measure.quantity.Temperature;
|
||||
@ -89,8 +88,7 @@ public final class EcobeeUtils {
|
||||
}
|
||||
|
||||
public static State undefOrDate(@Nullable Instant instant, TimeZoneProvider timeZoneProvider) {
|
||||
return instant == null ? UnDefType.UNDEF
|
||||
: new DateTimeType(ZonedDateTime.ofInstant(instant, timeZoneProvider.getTimeZone()));
|
||||
return instant == null ? UnDefType.UNDEF : new DateTimeType(instant);
|
||||
}
|
||||
|
||||
public static State undefOrDate(@Nullable LocalDateTime ldt, TimeZoneProvider timeZoneProvider) {
|
||||
|
Loading…
Reference in New Issue
Block a user