mirror of
https://github.com/openhab/openhab-addons.git
synced 2025-01-10 15:11:59 +01:00
Simplify DateTimeType handling for DWD Pollenflug
Signed-off-by: Jacob Laursen <jacob-github@vindvejr.dk>
This commit is contained in:
parent
4cea76be8e
commit
b724595c2a
@ -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());
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user