GutoVeronezi commented on code in PR #8581: URL: https://github.com/apache/cloudstack/pull/8581#discussion_r1490096703
########## usage/src/main/java/com/cloud/usage/UsageManagerImpl.java: ########## @@ -405,9 +405,14 @@ protected void runInContextInternal() { cal.add(Calendar.MILLISECOND, -1); endDate = cal.getTime().getTime(); } else { - endDate = cal.getTime().getTime(); // current time cal.add(Calendar.MINUTE, -1 * _aggregationDuration); + cal.set(Calendar.SECOND, 0); + cal.set(Calendar.MILLISECOND, 0); startDate = cal.getTime().getTime(); + + cal.add(Calendar.MINUTE, _aggregationDuration); + cal.add(Calendar.MILLISECOND, -1); + endDate = cal.getTime().getTime(); Review Comment: @BryanMLima, what will happen if we set aggregation greater than 1 day? -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: commits-unsubscr...@cloudstack.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org