GreptimeTeam / dashboard

The dashboard UI for GreptimeDB
Apache License 2.0
78 stars 20 forks source link

Supports query timezone setting #405

Closed killme2008 closed 6 months ago

killme2008 commented 8 months ago

After this patch https://github.com/GreptimeTeam/greptimedb/pull/3125, GreptimeDB already supports timezone setting for HTTP/gRPC protocols.

It's better that the dashboard could support this setting, and the users can use the setting to specify the query timezone.

The HTTP protocol can carry the timezone by the x-greptime-timezone header, and all the timezone strings can be found at Wikipedia https://en.wikipedia.org/wiki/List_of_tz_database_time_zones

But I think we can just support the timezone in the form of [+-]hh:mm, for example, +08:00 or -08:00.

The related issue is https://github.com/GreptimeTeam/greptimedb/issues/2907

killme2008 commented 8 months ago

Considering daylight saving time, we should support the timezone string too. The fixed offset can't cover the daylight saving time.

killme2008 commented 7 months ago

This feature needs to be prioritized as the timezone setting affects query results. And we can set the default timezone by retrieving the timezone info from browser settings if possible. @ZonaHex