Given the following query in Influxdb's Flux language:
from(bucket: "some-great-metrics")
|> range(start: v.timeRangeStart, stop: v.timeRangeStop)
|> aggregateWindow(every: 1mo, fn: sum)
|> yield()
Assuming my current timezone is PST
. How to ensure that aggregateWindow
respect the beginning and end of the 1mo
duration in this specific timezone (PST
)?
Searching in the documentation does not bring so much light to me, so far.
Seems like Influx 2.1 comes with a new Flux timezone package
You can try to upgrade to 2.1 and add this before your query:
import "timezone"
option location = timezone.location(name: "America/Los_Angeles")
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With