Simplify DateTimeType handling for DWD Pollenflug

Signed-off-by: Jacob Laursen <jacob-github@vindvejr.dk>
This commit is contained in:
Jacob Laursen 2024-12-10 21:43:55 +01:00 committed by lsiepel
parent 4cea76be8e
commit b724595c2a

View File

@ -16,8 +16,6 @@ import static org.openhab.binding.dwdpollenflug.internal.DWDPollenflugBindingCon
import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.time.ZoneId;
import java.time.ZonedDateTime;
import java.util.Collections;
import java.util.Date;
import java.util.HashMap;
@ -91,8 +89,7 @@ public class DWDPollenflug {
if (date == null) {
return UnDefType.NULL;
} else {
ZonedDateTime zoned = ZonedDateTime.ofInstant(date.toInstant(), ZoneId.systemDefault());
return new DateTimeType(zoned);
return new DateTimeType(date.toInstant());
}
}