grafana-infinity-datasource
grafana-infinity-datasource copied to clipboard
[Bug] Use UTC time zone when interpolating time variables, and not `Locale` server timezone
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.