Influx Timestamps

I’m using influxdb V1.8.10 (docker image) in an IOT stack to collect data from my weather station (amongst other things).
This is read by Grafana to display info through a web browser.
I’m also using influx client CLI V1.1.1 on a Linux box to execute ad-hoc queries.
My question relates to the timestamp I provide to “bound” a search query. For example:
influx -host 192.168.1.16 -port 8086 -database weather -execute "select spread(rain) from outside where time >= '2024-12-03T10:00:00Z' and time < '2024-12-03T14:00:00Z'"
This provides the expected output.
If I change the timezone to something other than Z; for example:
influx -host 192.168.1.16 -port 8086 -database weather -execute "select spread(rain) from outside where time >= '2024-12-03T10:00:00L' and time < '2024-12-03T14:00:00L'"
I get a “ERR: invalid timestamp string” error.
I can’t omit the Z when specifying a rfc3339 timestamp, so why can’t I apply another suffix instead of Z??

Try looking at InfluxQL timezones, you’ll find the syntax for the timezone function.

I don’t understand the root problem… Z stands for UTC time, which is the ONLY one supported by InfluxDB, any data you write into it will be saved in UTC, the tz() function allows you to specify an offset.

1 Like

I did find that page whilst researching, but that converts the output of the search result; not the input range.
My hope was that I could specify the time range in local time rather than ZULU.
From your response, I assume this is not possible.

Hello @ArthurC,
You’re correct unfortunately.
You can in Flux with v2 but not v1.