Skip to content

timezones do not work in InfluxDB 2 on Windows #23248

Open
@alespour

Description

@alespour

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: 657e183) 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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions