增加统计间隔

This commit is contained in:
zy 2025-11-19 11:13:26 +08:00
parent 30fb0df4a3
commit 14cf3ee91b
1 changed files with 2 additions and 2 deletions

View File

@ -44,7 +44,7 @@ public class TimeIntervalUtils {
while (!current.isAfter(end)) { while (!current.isAfter(end)) {
intervals.add(current.format(formatter)); intervals.add(current.format(formatter));
showIntervals.add(current.format(SHOW_FORMATTER)); showIntervals.add(current.format(SHOW_FORMATTER));
current = current.plusMinutes(5); current = current.plusMinutes(15);
} }
commonDateListResult.setQueryList(intervals); commonDateListResult.setQueryList(intervals);
commonDateListResult.setShowList(showIntervals); commonDateListResult.setShowList(showIntervals);
@ -56,7 +56,7 @@ public class TimeIntervalUtils {
*/ */
private static LocalDateTime roundTo5Minutes(LocalDateTime dateTime) { private static LocalDateTime roundTo5Minutes(LocalDateTime dateTime) {
int minute = dateTime.getMinute(); int minute = dateTime.getMinute();
int roundedMinute = (minute / 5) * 5; int roundedMinute = (minute / 15) * 15;
return dateTime.withMinute(roundedMinute).withSecond(0).withNano(0); return dateTime.withMinute(roundedMinute).withSecond(0).withNano(0);
} }
} }