增加统计间隔
This commit is contained in:
parent
30fb0df4a3
commit
14cf3ee91b
|
|
@ -44,7 +44,7 @@ public class TimeIntervalUtils {
|
|||
while (!current.isAfter(end)) {
|
||||
intervals.add(current.format(formatter));
|
||||
showIntervals.add(current.format(SHOW_FORMATTER));
|
||||
current = current.plusMinutes(5);
|
||||
current = current.plusMinutes(15);
|
||||
}
|
||||
commonDateListResult.setQueryList(intervals);
|
||||
commonDateListResult.setShowList(showIntervals);
|
||||
|
|
@ -56,7 +56,7 @@ public class TimeIntervalUtils {
|
|||
*/
|
||||
private static LocalDateTime roundTo5Minutes(LocalDateTime dateTime) {
|
||||
int minute = dateTime.getMinute();
|
||||
int roundedMinute = (minute / 5) * 5;
|
||||
int roundedMinute = (minute / 15) * 15;
|
||||
return dateTime.withMinute(roundedMinute).withSecond(0).withNano(0);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue