use of com.infiniteautomation.mango.rest.v2.util.ExpandTimePeriodAdjuster in project ma-modules-public by infiniteautomation.
the class ZonedDateTimeRangeQueryInfo method setupDates.
/**
* Round off the period for rollups
*/
protected void setupDates() {
// Round off the period if we are using periodic rollup
if (this.timePeriod != null) {
TruncateTimePeriodAdjuster adj = new TruncateTimePeriodAdjuster(TimePeriodType.convertFrom(this.timePeriod.getType()), this.timePeriod.getPeriods());
from = from.with(adj);
ExpandTimePeriodAdjuster expander = new ExpandTimePeriodAdjuster(from, TimePeriodType.convertFrom(this.timePeriod.getType()), this.timePeriod.getPeriods());
to = to.with(expander);
}
}
Aggregations