From e7c579d8f1bcb7f4e91053bb23c6bcf743e1d050 Mon Sep 17 00:00:00 2001 From: JueLance Date: Wed, 13 Sep 2023 09:54:55 +0800 Subject: [PATCH] Fix java.sql.Date serialize error by convert it to java.util.Date (#13050) --- .../org/apache/dolphinscheduler/common/utils/DateUtils.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dolphinscheduler-common/src/main/java/org/apache/dolphinscheduler/common/utils/DateUtils.java b/dolphinscheduler-common/src/main/java/org/apache/dolphinscheduler/common/utils/DateUtils.java index 11c86ec531..16182ccda6 100644 --- a/dolphinscheduler-common/src/main/java/org/apache/dolphinscheduler/common/utils/DateUtils.java +++ b/dolphinscheduler-common/src/main/java/org/apache/dolphinscheduler/common/utils/DateUtils.java @@ -75,7 +75,7 @@ public final class DateUtils { * @return local datetime */ private static LocalDateTime date2LocalDateTime(Date date, ZoneId zoneId) { - return LocalDateTime.ofInstant(date.toInstant(), zoneId); + return LocalDateTime.ofInstant(Instant.ofEpochMilli(date.getTime()), zoneId); } /**