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
Enable datasources to be able to round off to a UTC day properly #8916
Conversation
@@ -201,8 +201,8 @@ class TimeSrv { | |||
}; | |||
|
|||
return { | |||
from: dateMath.parse(raw.from, false), | |||
to: dateMath.parse(raw.to, true), | |||
from: dateMath.parse(raw.from, false, this.dashboard.timezone), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
you should use this.dashboard.getTimezone(), the it will check if timezone is set on dashboard or if the default user/org timezone should be used
looks nice, please sign CLA :) |
I signed the CLA, it just doesn't appear to be updating on the PR. If I go to the linked page, it says I've signed it, but rechecking isn't doing anything. I've updated this to use getTimezone() instead |
It's because I have 2 github accounts, fixed now. |
@@ -225,6 +225,7 @@ class MetricsPanelCtrl extends PanelCtrl { | |||
}); | |||
|
|||
var metricsQuery = { | |||
timezone: this.dashboard.timezone, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
think this should be this.dashboard.getTimezone(), if dashboard timezone is set to default it is null, and the timezone will be read from user or org preferences
Fixed and rebased against current master. |
merged to master, thanks for contributing & sorry for taking such a long time with it |
Thanks! |
This enables the various datasources to fix #7823 by passing in the dashboard timezone setting. I haven't touched any of the built in datasources because I don't have any way to test any of them (we only use a custom datasource.)