influxdata / influxdata/influxdb
timezones do not work in InfluxDB 2 on Windows
- Dominant language
- Rust
- Stars
- 31.7k
- Forks
- 3.7k
- Avg merge
- 13h 37m
- Merged PRs (30d)
- 8
Description
__Steps to reproduce:__
1. run Flux query with location, eg.
```
import "array"
import "timezone"
array.from(rows:[
{_time: 2022-03-12T00:00:00Z, _value: 10},
{_time: 2022-03-12T06:00:00Z, _value: 20},
{_time: 2022-03-12T12:00:00Z, _value: 30},
{_time: 2022-03-12T18:00:00Z, _value: 40}
])
|> aggregateWindow(every: 1d, fn:mean, location: timezone.location(name: "America/Los_Angeles"))
```
__Expected behavior:__
Data are returned.
__Actual behavior:__
Error `error calling function "location" @10:52-10:98: unknown time zone America/Los_Angeles` occurs.
__Environment info:__
* System info: Windows 7
* InfluxDB version: InfluxDB 2.1.1 (git: 657e1839de) build_date: 2021-11-09T03:03:48Z
Workaround is to download `zoneinfo.zip` from Go repo and set `ZONEINFO` env var. Discussed at https://community.influxdata.com/t/error-while-defining-location-parameter-for-aggregatewindow/24433.
Contributor guide
Research direction
Start by running the supplied Flux query using timezone.location(name: "America/Los_Angeles") on Windows 7, first without and then with the ZONEINFO environment variable set to Go's zoneinfo.zip. Investigate the timezone lookup behavior and verify that the query returns data without requiring that workaround.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- go
- Domain
- databases
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100