plz help me it not filter the data on timezone i tried it as well
Describe the issue here. option location = timezone.location(name: "Europe/Istanbul") from(bucket: "os2_db") |> range(start: 0) |> filter(fn: (r) => r["_measurement"] == "os_records")|> filter(fn: (r) => exists r["_field"])|> truncateTimeColumn(unit: 10s)|>last()
here my query it doesnt give me current time of istanbul
Relevant URLs
- https://docs.influxdata.com/flux/v0.x/stdlib/timezone/location/
- Provide other relevant URLs (project issues, community threads, etc.)
@xalteropsx the location option doesn't modify timestamps. It changes how window() works when generating windows of time that cross time change boundaries (like daily savings time or British summer time).
To actually modify timestamps, use timeShift() with the UTC-relative offset of your timezone.
option location = timezone.location(name: "Europe/Istanbul")
from(bucket: "os2_db")
|> range(start: 0)
|> filter(fn: (r) => r["_measurement"] == "os_records")
|> filter(fn: (r) => exists r["_field"])
|> truncateTimeColumn(unit: 10s)
|> timeShift(duration: 3h)
|>last()
@sanderson thank u very much it working great