From 765887e73e21714c6993fb1aadb5cb28ab88a109 Mon Sep 17 00:00:00 2001 From: kyotom Date: Tue, 15 Jul 2025 11:35:53 +0800 Subject: [PATCH] [hotfix-#1952][core|doris] Fix ARRAY and LARGEINT type conversion exceptions --- .../main/java/com/dtstack/chunjun/util/DateUtil.java | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/chunjun-core/src/main/java/com/dtstack/chunjun/util/DateUtil.java b/chunjun-core/src/main/java/com/dtstack/chunjun/util/DateUtil.java index f6fbc466b8..688c30f6d0 100644 --- a/chunjun-core/src/main/java/com/dtstack/chunjun/util/DateUtil.java +++ b/chunjun-core/src/main/java/com/dtstack/chunjun/util/DateUtil.java @@ -48,6 +48,9 @@ public class DateUtil { private static final String TIME_ZONE = "GMT+8"; + private static final boolean isUseLocalTimeZone = + Boolean.parseBoolean(System.getProperty("USE_LOCAL_TIMEZONE")); + private static final String STANDARD_DATETIME_FORMAT = "standardDatetimeFormatter"; private static final String STANDARD_DATETIME_FORMAT_FOR_MILLISECOND = @@ -97,7 +100,12 @@ public class DateUtil { public static ThreadLocal> datetimeFormatter = ThreadLocal.withInitial( () -> { - TimeZone timeZone = TimeZone.getTimeZone(TIME_ZONE); + TimeZone timeZone; + if (isUseLocalTimeZone) { + timeZone = TimeZone.getDefault(); + } else { + timeZone = TimeZone.getTimeZone(TIME_ZONE); + } Map formatterMap = new HashMap<>(); SimpleDateFormat standardDatetimeFormatter =