Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
ivanahuckova opened this issue Aug 28, 2024 · 2 comments
Assignees
Labels
type/bug Something isn't working

Comments

@ivanahuckova
Copy link
Member

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 ivanahuckova added the type/bug Something isn't working label Aug 28, 2024
@ivanahuckova
Copy link
Member Author

@yesoreyeram I think this should be fine to implement, but will wait for you so we can discuss.

@ivanahuckova ivanahuckova self-assigned this Aug 28, 2024
@marefr
Copy link
Member

marefr commented Sep 5, 2024

Some additional thoughts regarding variables and timezones https://github.com/grafana/support-escalations/issues/11969#issuecomment-2331365821

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type/bug Something isn't working
Projects
Status: Backlog
Development

No branches or pull requests

2 participants