influxdata / influxdb

Scalable datastore for metrics, events, and real-time analytics
https://influxdata.com
Apache License 2.0
28.82k stars 3.55k forks source link

error parsing query: unable to find time zone #10196

Closed CoderOverflow closed 5 years ago

CoderOverflow commented 6 years ago

System info: [Include InfluxDB version, operating system name, and other relevant details] 1.6.1 window 2003 Steps to reproduce:

5v l2lc aojs8vy0 v 74w

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

dzz41e _f46y4tl8mzulp q

kabua commented 6 years ago

I got the same thing when trying to use America/Chicago or America/New_York

Here's some example code:

> select * from "computerInfo1"
name: computerInfo1
time                Host      Region  cpu              ram
----                ----      ------  ---              ---
1536016386197803300 some-host west-eu 0.29180121807931 1122304810
>
> select * from "computerInfo1" tz('America/New_York')
ERR: error parsing query: unable to find time zone America/New_York
> select * from "computerInfo1" tz('America/Chicago')
ERR: error parsing query: unable to find time zone America/Chicago
steinelg commented 6 years ago

+1 It would be great to have this feature back, any help much appreciated.

Running windows 7 and InfluxDB 1.6.0 i get the same issue. This is perhaps windows-specific?

zhgqiang commented 5 years ago

因为InfluxDB开发语言是go,我测试了一下配置go环境变量,就没有问题了,主要依赖go下边的lib库。

zheng7yan commented 5 years ago

@zhgqiang 你好,请问您是在windows机器上配置的go环境变量来解决这个问题的吗?如果是的话,能大体告知一下吗? ps:我用的influxd版本是1.7.4.1,系统是win server 2016


已经解决了,安装一下golang的安装包,重启一下influxd就可以了

stale[bot] commented 5 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

stale[bot] commented 5 years ago

This issue has been automatically closed because it has not had recent activity. Please reopen if this issue is still important to you. Thank you for your contributions.

bomerzz commented 5 years ago

Any updates on the above issue? Still present on windows for 1.7.7

sbhenderson commented 5 years ago

This describes what's happening in more detail: Golang TZ issue

Turns out, this is a general issue with Go on Windows platforms, but anyone who is Googling may at least find out the answer from the referenced issue. Personally, I was able to resolve it by getting the zoneinfo.zip from installing Go locally (not necessary on the Windows machine running InfluxDB) and placing it into the correct folder.

ashishtaldeokar commented 4 years ago

In case, anyone has this issue in Ubuntu systems, you probably are missing Timezone data in OS that is timedatectl list-timezones returns only UTC format. In this case, you can just install the tzdata package, ex apt install tzdata or if it is already installed you can just reconfigure using dpkg-reconfigure tzdata This worked for me, as a fresh VM from gcp did not have tzdata and my influx setup came across this error.

henjoe commented 10 months ago

This describes what's happening in more detail: Golang TZ issue

Turns out, this is a general issue with Go on Windows platforms, but anyone who is Googling may at least find out the answer from the referenced issue. Personally, I was able to resolve it by getting the zoneinfo.zip from installing Go locally (not necessary on the Windows machine running InfluxDB) and placing it into the correct folder.

Hi I know this is a little bit old, but I can't find proper solutions for this. I am using influxdb 1.8 on windows machine using the tz command gives me error. Have you resolve it? You said on windows machine, it is not necessary to install Go locally? and you get the zone.info? Thanks