From a conversation in #2074.
We should support a more user-friendly way to set timezone offsets. In 0.13, you will be able to set an offset with an extra parameter in the GROUP BY time(...) section like this:
SELECT mean(value) FROM cpu WHERE time > now() - 7d GROUP BY time(1d, -5h)
It should also be possible to set this timezone offset through doing something like this:
SELECT mean(value) FROM cpu WHERE time > now() - 7d GROUP BY time(1d) TZ("America/New York")
This should automatically set the group by offset and could potentially be used for something else like handling daylight savings time switches.
note that using a offset and using TZ("America/New York") is (should) not be the same
the TZ implementation requires
1: times in the database are in UTC
2: before the grouping: convert all "time"-s in to the required TZ
3: do the grouping (since "time" now is a local time grouping will handle DST, and yes this will imply one day per year with 23 h and one day with 25h but thats OK ). Here the offset syntax will not be able to handle DST
4: last step i am not totally sure: *Should the result be converted back to UTC? * in case of continues queries: yes, you don't want to save local times in you DB. In case of client queries: probably yes too. only return UTC times to the client. this just might seem a bit strange since you will get daily aggregated values att an offset in UTC. However its the clients responsibility to present this correct.
Further to this, please do not conflate offsets with timezones.
https://spin.atomicobject.com/2016/07/06/time-zones-offsets/
This feature would actually be incredible, our support model is traditional follow-the-sun and it's difficult for some remote users to mentally adjust for timezones. Explicit settings would help tremendously.
+1
Timezone support is a must have. The offset allows to handle that client side by changing the query depending on DST/TZ, but it really should be handled on the server to support queries that have an offset change in the middle of the selected time range.
has this been removed in 1.5?
Most helpful comment
This feature would actually be incredible, our support model is traditional follow-the-sun and it's difficult for some remote users to mentally adjust for timezones. Explicit settings would help tremendously.