diff --git a/bundles/org.openhab.binding.miio/src/main/java/org/openhab/binding/miio/internal/handler/MiIoVacuumHandler.java b/bundles/org.openhab.binding.miio/src/main/java/org/openhab/binding/miio/internal/handler/MiIoVacuumHandler.java index 2b0efc2e322..01a791fb68a 100644 --- a/bundles/org.openhab.binding.miio/src/main/java/org/openhab/binding/miio/internal/handler/MiIoVacuumHandler.java +++ b/bundles/org.openhab.binding.miio/src/main/java/org/openhab/binding/miio/internal/handler/MiIoVacuumHandler.java @@ -552,12 +552,12 @@ public class MiIoVacuumHandler extends MiIoAbstractHandler { JsonObject historyRecord = GSON.toJsonTree(historyRecordDTO).getAsJsonObject(); if (historyRecordDTO.getStart() != null) { DateTimeType start = new DateTimeType(historyRecordDTO.getStart()); - historyRecord.addProperty("start", start.toLocaleZone().format(null)); + historyRecord.addProperty("start", start.format(null)); updateState(CHANNEL_HISTORY_START_TIME, start); } if (historyRecordDTO.getEnd() != null) { DateTimeType end = new DateTimeType(historyRecordDTO.getEnd()); - historyRecord.addProperty("end", end.toLocaleZone().format(null)); + historyRecord.addProperty("end", end.format(null)); updateState(CHANNEL_HISTORY_END_TIME, end); } if (historyRecordDTO.getDuration() != null) { diff --git a/bundles/org.openhab.binding.miio/src/test/java/org/openhab/binding/miio/internal/handler/MiIoVacuumHandlerTest.java b/bundles/org.openhab.binding.miio/src/test/java/org/openhab/binding/miio/internal/handler/MiIoVacuumHandlerTest.java index 57f4144d461..b1708027538 100644 --- a/bundles/org.openhab.binding.miio/src/test/java/org/openhab/binding/miio/internal/handler/MiIoVacuumHandlerTest.java +++ b/bundles/org.openhab.binding.miio/src/test/java/org/openhab/binding/miio/internal/handler/MiIoVacuumHandlerTest.java @@ -17,7 +17,6 @@ import static org.mockito.ArgumentMatchers.*; import static org.mockito.Mockito.*; import java.io.IOException; -import java.time.ZoneId; import java.time.ZonedDateTime; import java.util.concurrent.TimeUnit; @@ -132,11 +131,11 @@ public class MiIoVacuumHandlerTest { verify(callback, description("Test the start time parsing")).stateUpdated( eq(new ChannelUID(thingUID, MiIoBindingConstants.CHANNEL_HISTORY_START_TIME)), - eq(new DateTimeType(ZonedDateTime.parse("2024-08-20T19:20:13+02:00")).toZone(ZoneId.systemDefault()))); + eq(new DateTimeType(ZonedDateTime.parse("2024-08-20T19:20:13+02:00")))); verify(callback, description("Test the end time parsing")).stateUpdated( eq(new ChannelUID(thingUID, MiIoBindingConstants.CHANNEL_HISTORY_END_TIME)), - eq(new DateTimeType(ZonedDateTime.parse("2024-08-20T19:20:59+02:00")).toZone(ZoneId.systemDefault()))); + eq(new DateTimeType(ZonedDateTime.parse("2024-08-20T19:20:59+02:00")))); verify(callback, description("Test the duration parsing")).stateUpdated( eq(new ChannelUID(thingUID, MiIoBindingConstants.CHANNEL_HISTORY_DURATION)),