# Timezone problem

**URL:** <https://community.influxdata.com/t/timezone-problem/8521>\
**Category:** Systems\
**Tags:** time\
**Created:** [February 11, 2019, 6:43pm UTC](https://community.influxdata.com/t/timezone-problem/8521 "2019-02-11T18:43:01Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![mackowiakp](https://avatars.discourse-cdn.com/v4/letter/m/f04885/32.png) [@mackowiakp](https://community.influxdata.com/u/mackowiakp)\
**Post date:** [February 11, 2019, 6:43pm UTC](https://community.influxdata.com/t/timezone-problem/8521/1 "2019-02-11T18:43:01Z")

</div>

I am very new in InfluxDB. I have InfluxDB, Kapacitor and Chronograf installed on QNAP NAS. It collects data form Domoticz (installed on Raspberry Pi) via build-in Domoticz interface to InfluxDB. Grafana is installed on my Desktop PC.  
My timezone is Europe/Warsaw. The problem I have is that Grafana, Chronograf shows time according to my timezone. But if I want to query database from CLI, the time is presented according to GMT time. All data in database are stored with UTC timestamps. I checked it using on-line Unix timestamp converter available on Internet.  
But if I query database directly from QNAP CLI presents a time according to GMT. The same situation is when I query DB over network using CURL.  
Below syntax of my CLI query:

> Blockquote  
> influx -precision rfc3339 -execute “SELECT mean(“value”) AS “mean\_value” FROM “nanopi”.“autogen”.“Temperature” WHERE time &nbsp;\>  
> now() - $time GROUP BY time(1s) FILL(none)”

It returns proper values but time is specify according to GMT

So i want to add tz() to query. Below query and result

> Blockquote  
> influx -precision rfc3339 -execute “SELECT mean(“value”) AS “mean\_value” FROM “nanopi”.“autogen”.“Temperature” WHERE time &nbsp;\>  
> now() - $time GROUP BY time(1s) FILL(none) tz(‘Europe/Warsaw’)”  
> ERR: error parsing query: unable to find time zone Europe/Warsaw  
> Warning: It is possible this error is due to not setting a database.  
> Please set a database with the command “use \<database\>”.  
> error parsing query: unable to find time zone Europe/Warsaw

What I am doing wrong? Any syntax error? Be so kind to help as I am newbie…

---

<div class="post-metadata">

**Author:** ![samaust](https://sea1.discourse-cdn.com/flex023/user_avatar/community.influxdata.com/samaust/32/867_2.png) [@samaust](https://community.influxdata.com/u/samaust)\
**Post date:** [February 13, 2019, 4:25am UTC](https://community.influxdata.com/t/timezone-problem/8521/2 "2019-02-13T04:25:13Z")

</div>

Try to replace the single quotes around Europe/Warsaw with double quotes. If that works, there’s a typo in the docs.

On what OS is InfluxDB running on?

I think the code calls time.LoadLocation. Maybe that location is missing in the database on that OS.

> **[time package - time - Go Packages](https://pkg.go.dev/time)**
>
> Package time provides functionality for measuring and displaying time.

---

<div class="post-metadata">

**Author:** ![mackowiakp](https://avatars.discourse-cdn.com/v4/letter/m/f04885/32.png) [@mackowiakp](https://community.influxdata.com/u/mackowiakp)\
**Post date:** [February 13, 2019, 6:24am UTC](https://community.influxdata.com/t/timezone-problem/8521/3 "2019-02-13T06:24:08Z")

</div>

I find out source of problem:

> [influxdb - Unable to find time zone - Stack Overflow](https://stackoverflow.com/questions/52129582/unable-to-find-time-zone)
> 
> This is a known bug, see:  
> [error parsing query: unable to find time zone · Issue #10196 · influxdata/influxdb · GitHub](https://github.com/influxdata/influxdb/issues/10196)

As documentation stands, InfluxDB should use local time by default or timezone specified in query. In my case GMT+1 is a local time.

And workaround. InfluxDB is installed on QNAP NAS with QTS operating system. Zone info is located in /etc/zoneinfo/Europe and there is no definition for Warsaw. Below the content of this dir:

> Amsterdam Athens Belgrade Bucharest Helsinki London Moscow Paris Sarajevo

Thats all. No Brussels, no Berlin etc. So I changed in query Europe/Warsaw to Europe/Paris and now works OK.  
Nevertheless there is a bug in DB from my point of view.
