mirror of
https://github.com/openhab/openhab-addons.git
synced 2025-01-10 15:11:59 +01:00
Simplify DateTimeType handling for Feed
Signed-off-by: Jacob Laursen <jacob-github@vindvejr.dk>
This commit is contained in:
parent
f61cc6dec7
commit
baf7ec6c2a
@ -21,8 +21,6 @@ import java.math.BigDecimal;
|
|||||||
import java.net.MalformedURLException;
|
import java.net.MalformedURLException;
|
||||||
import java.net.URL;
|
import java.net.URL;
|
||||||
import java.net.URLConnection;
|
import java.net.URLConnection;
|
||||||
import java.time.ZoneId;
|
|
||||||
import java.time.ZonedDateTime;
|
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.concurrent.ScheduledFuture;
|
import java.util.concurrent.ScheduledFuture;
|
||||||
@ -184,8 +182,7 @@ public class FeedHandler extends BaseThingHandler {
|
|||||||
return;
|
return;
|
||||||
} else {
|
} else {
|
||||||
Date date = latestEntry.getPublishedDate();
|
Date date = latestEntry.getPublishedDate();
|
||||||
ZonedDateTime zdt = ZonedDateTime.ofInstant(date.toInstant(), ZoneId.systemDefault());
|
state = new DateTimeType(date.toInstant());
|
||||||
state = new DateTimeType(zdt);
|
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case CHANNEL_AUTHOR:
|
case CHANNEL_AUTHOR:
|
||||||
|
Loading…
Reference in New Issue
Block a user