Influx - Flux aggregateWindow returned window times

68 views Asked by At

I am trying to figure out how influx is calculating the times returned from a flux query with an aggregateWindow.

For example: I am doing a pretty basic aggregateWindow(every: 300d, fn: mean). If I use a range with start 2019-03-30T14:35:34.932Z the first entry in the returned data has a time of 2019-04-14T00:00:00Z

It doesn't depend on the data. Even if I change to a year where there is no data in the first period it still return the same time (in that year, i.e. 2022-04-14).

I can't find anything in the docs about this apart from a hint regarding using weeks "Flux increments weeks from the Unix epoch, which was a Thursday.". Does this apply to all values "every"? I.e. are all windows being aligned to the epoch?

How would I go about implementing something similar in Java?

0

There are 0 answers