grafana-infinity-datasource icon indicating copy to clipboard operation
grafana-infinity-datasource copied to clipboard

[Bug] Use UTC time zone when interpolating time variables, and not `Locale` server timezone

Open ivanahuckova opened this issue 5 months ago • 2 comments

Ehen interpolating the time range for $__timeFrom and $__timeTo, instead of passing timeRange.From and timeRange.To, we should pass timeRange.From.UTC(). In the current implementation, the time zone is not explicitly specified, so it defaults to the Local time zone of the Grafana server, which can be incorrect and unexpected. This fix will at least ensure consistency in the time zone being used (other data sources handle this in the same way). Once this change is implemented, it would resolve the issue for cases where users have selected the UTC time zone.

ivanahuckova avatar Aug 28 '24 11:08 ivanahuckova