What Grafana version and what operating system are you using?
Windows 10 - Grafana v7.4.3 0 InfluxDB 1.8.9
What are you trying to achieve?
Add timezone “tz” to query
How are you trying to achieve it?
SELECT sum(“value”) / 360 FROM “mcsMQTT” WHERE (“device” = ‘!HOME ENERGY SENSORS_SONOFFBASIC3_SENSOR:ENERGY:Power:TOTAL’) AND $timeFilter GROUP BY time(1d) tz(‘America/New_York’)
{
“request”: {
“method”: “POST”,
“url”: “api/datasources/proxy/1/query”,
“params”: {
“db”: “MCSMQTT2INFLUXDB”,
“epoch”: “ms”
},
“data”: “q=SELECT%20sum(%22value%22)%20%20%2F%20360%20FROM%20%22mcsMQTT%22%20WHERE%20(%22device%22%20%3D%20’!HOME%20ENERGY%20SENSORS_SONOFFBASIC3_SENSOR%3AENERGY%3APower%3ATOTAL’)%20AND%20time%20%3E%3D%20now()%20-%207d%20GROUP%20BY%20time(1d)%20tz(‘America%2FNew_York’)”,
“precision”: “ms”,
“hideFromInspector”: false
},
“response”: {
“error”: “error parsing query: unable to find time zone America/New_York”,
“message”: “error parsing query: unable to find time zone America/New_York”
}
}
What did you expect to happen?
Chart offset to reflect correct timezone (EST) and follow DST (UTC-5 or UTC-4)
Can you copy/paste the configuration(s) that you are having problems with?
above
Did you receive any errors in the Grafana UI or in related logs? If so, please tell us exactly what they were.
above
Did you follow any online instructions? If so, what is the URL?
opened 02:02PM - 13 Apr 18 UTC
closed 08:46AM - 16 Jun 21 UTC
datasource/InfluxDB
needs more info
area/dashboard/timezone
area/datasource
### What Grafana version are you using?
Version 4.6.3 (commit: 7a06a47)
### … What datasource are you using?
InfluxDB
### What OS are you running grafana on?
16.04.1-Ubuntu
### What did you do?
Created a dashboard that accesses data stored in an influxdb database, UTC time format.
Set the dashboard time to local browser time. Local system time is currently CEST.
### What was the expected result?
The dashboard displays the results for UTC+2 because that is the time zone I am currently in.
### What happened instead?
**Actually two issues:**
1. The dashboard displays the results for UTC+1 (CET)
2. When aggregated and grouped by time(1d), the result is from 1am - 1am, so it delivers the time grouped by UTC midnight to midnight, but should do it either from _CEST midnight to midnight_ or _UTC 10pm -1 day till 10pm_.
For clarification some outputs:
database output for UTC:
```
> select sum(value) from "autogen"."testtrack" where testtag = 'abc' and time >= '2018-02-04T23:00:00Z' and time <= '2018-02-07T01:00:00Z' group by time(1d)
name: testtrack
time sum
---- ---
...
2018-02-05T00:00:00Z 960918
2018-02-06T00:00:00Z 926282
...
```
database output for UTC+1 (so the timeshift is actually -1h):
```
> select sum(value) from "autogen"."testtrack" where testtag = 'abc' and time >= '2018-02-04T23:00:00Z' and time <= '2018-02-07T01:00:00Z' group by time(1d, -1h)
name: testtrack
time sum
---- ---
...
2018-02-05T23:00:00Z 933437
2018-02-06T23:00:00Z 934796
…
```
Grafana output for Dashboard >Settings > Timezone > UTC:
```
Time | sum
2018-02-04 00:00:00 | 89.54 K
2018-02-05 00:00:00 | 960.92 K
2018-02-06 00:00:00 | 926.28 K
2018-02-07 00:00:00 | 487.00
```
and > Local browser time:
```
Time | sum
2018-02-04 01:00:00 | 89.54 K
2018-02-05 01:00:00 | 960.92 K
2018-02-06 01:00:00 | 926.28 K
2018-02-07 01:00:00 | 487.00
```
I can see in the network request, that the request in both cases is sent without a timeshift, therefore the result is “right” in terms of answering the sent request. But shouldn’t the “local browser time” - setting translate the request to the local browser time in reference to UTC?
The manual fix for this is to send a timeshift with every request, but I am building dashboards for various parameters with various panels and for staff working in different time zones.
Any ideas how I can fix this? Or is it a bug?
Maybe I am entirely misunderstanding the local browser time option - help is highly appreciated for both of the issues.
This is a list of time zones from release 2021e of the tz database.
Standard Time (STD) and Daylight Saving Time (DST) offsets from UTC in hours and minutes.
For zones in which Daylight Saving is not observed, the DST offset shown in this table is a simple duplication of the STD offset.
The UTC offsets are based on the current or upcoming database rules. This table does not attempt to document any of the historical data which resides in the database.
Time zone abbreviations for both Standard ...
Anyone? Thanks for your help,
Hi I wonder if you already solved it?
Let me guess, that you are using InfluxDB on Windows. Then it’s InfluxDB issue, not Grafana issue.
opened 02:24AM - 15 Aug 18 UTC
closed 06:43AM - 30 Jul 19 UTC
kind/bug
1.x
wontfix
__System info:__ [Include InfluxDB version, operating system name, and other rel… evant details]
1.6.1 window 2003
__Steps to reproduce:__

I used tz(), but it cannot run correctly.
received status code 400 from server: err: error parsing query: unable to find time zone Europe/Athens

Exactly, Influxdb on windows. Thanks for the hint!
Is installing it on linux does solve the issue? I wonder if you already did.
Thanks brother.
Just try and you will see,dunno.
1 Like
rikutozumoko:
Influxdb on windows
Workaround for InfluxDB timezone issue on Windows:
Download https://github.com/golang/go/raw/master/lib/time/zoneinfo.zip
Set environment variable ZONEINFO to the absolute path of this file:
set ZONEINFO=C:\InfluxDB\zoneinfo.zip
influxd run
Or specify it in Environment tab of NSSM if using it:
1 Like