]> git.basschouten.com Git - openhab-addons.git/commitdiff
[astro] Fix IllegalArgumentException in debug message (#13884)
authorHilbrand Bouwkamp <hilbrand@h72.nl>
Fri, 9 Dec 2022 11:31:49 +0000 (12:31 +0100)
committerGitHub <noreply@github.com>
Fri, 9 Dec 2022 11:31:49 +0000 (12:31 +0100)
Formatter should get Date object.

Closes #13871

Signed-off-by: Hilbrand Bouwkamp <hilbrand@h72.nl>
bundles/org.openhab.binding.astro/src/main/java/org/openhab/binding/astro/internal/handler/AstroThingHandler.java

index dfb34d61ccbae9127aa22b42a497f30720f0d986..c369eb99cde2998a90a37cfc19f68c33cf079c01 100644 (file)
@@ -310,7 +310,7 @@ public abstract class AstroThingHandler extends BaseThingHandler {
             monitor.unlock();
         }
         if (logger.isDebugEnabled()) {
-            String formattedDate = this.isoFormatter.format(eventAt);
+            final String formattedDate = this.isoFormatter.format(eventAt.getTime());
             logger.debug("Scheduled {} in {}ms (at {})", job, sleepTime, formattedDate);
         }
     }