diff --git a/core/core-backend/src/main/java/io/dataease/chart/manage/ChartViewThresholdManage.java b/core/core-backend/src/main/java/io/dataease/chart/manage/ChartViewThresholdManage.java index 21b31efe2e..7513d8dbcb 100644 --- a/core/core-backend/src/main/java/io/dataease/chart/manage/ChartViewThresholdManage.java +++ b/core/core-backend/src/main/java/io/dataease/chart/manage/ChartViewThresholdManage.java @@ -362,9 +362,9 @@ public class ChartViewThresholdManage { } } else { if (timeFlag == 4) { - return now.withDayOfMonth(1).format(formatter); + return now.withDayOfMonth(1).withHour(0).withMinute(0).withSecond(0).format(formatter); } else if (timeFlag == 5) { - return now.plusMonths(1).withDayOfMonth(1).minusDays(1).format(formatter); + return now.plusMonths(1).withDayOfMonth(1).minusDays(1).withHour(0).withMinute(0).withSecond(0).format(formatter); } else { return getCustomTimeValue(format, 3, suffix, count, true); } @@ -381,7 +381,9 @@ public class ChartViewThresholdManage { LocalDateTime now = LocalDateTime.now(); String fullFormat = "yyyy-MM-dd HH:mm:ss"; int len = format.length(); - if (!hasTime) { + if (hasTime) { + now = now.withHour(0).withMinute(0).withSecond(0); + } else { len = Math.min(len, 10); } DateTimeFormatter formatter = DateTimeFormatter.ofPattern(fullFormat.substring(0, len)); diff --git a/de-xpack b/de-xpack index 15fd94f9b3..7d763d1a73 160000 --- a/de-xpack +++ b/de-xpack @@ -1 +1 @@ -Subproject commit 15fd94f9b316a6956be8eddaf4ba6196dcccb7a2 +Subproject commit 7d763d1a73750889a5a6abc6faf658aab3c48099