From a22f7afb536a8eafc8981f6225b91fb0b96f26bf Mon Sep 17 00:00:00 2001 From: pengzirui Date: Fri, 15 Dec 2023 15:16:53 +0800 Subject: [PATCH] make zoneid default --- .../apache/inlong/sort/function/RoundTimestampFunction.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/inlong-sort/sort-core/src/main/java/org/apache/inlong/sort/function/RoundTimestampFunction.java b/inlong-sort/sort-core/src/main/java/org/apache/inlong/sort/function/RoundTimestampFunction.java index bc2db4f7340..70a713ff5c4 100644 --- a/inlong-sort/sort-core/src/main/java/org/apache/inlong/sort/function/RoundTimestampFunction.java +++ b/inlong-sort/sort-core/src/main/java/org/apache/inlong/sort/function/RoundTimestampFunction.java @@ -34,7 +34,7 @@ public class RoundTimestampFunction extends ScalarFunction { private static final long serialVersionUID = 1L; public static final Logger LOG = LoggerFactory.getLogger(RoundTimestampFunction.class); - + public static final ZoneId DEFAULT_ZONE = ZoneId.systemDefault(); private transient DateTimeFormatter formatter; /** @@ -51,7 +51,7 @@ public String eval(Long timestamp, Long roundTime, String format) { try { LocalDateTime dateTime = LocalDateTime.ofInstant( Instant.ofEpochSecond(timestamp - timestamp % roundTime), - ZoneId.systemDefault()); + DEFAULT_ZONE); if (formatter == null) { formatter = DateTimeFormatter.ofPattern(format); }