Commit a02cac21 by Torkel Ödegaard

refactoring: minor refactoring of PR #8916

parent 42a0e9eb
......@@ -19,6 +19,7 @@
* **Prometheus**: Add support for instant queries [#5765](https://github.com/grafana/grafana/issues/5765), thx [@mtanda](https://github.com/mtanda)
* **Cloudwatch**: Add support for alerting using the cloudwatch datasource [#8050](https://github.com/grafana/grafana/pull/8050), thx [@mtanda](https://github.com/mtanda)
* **Pagerduty**: Include triggering series in pagerduty notification [#8479](https://github.com/grafana/grafana/issues/8479), thx [@rickymoorhouse](https://github.com/rickymoorhouse)
* **Timezone**: Time ranges like Today & Yesterday now work correctly when timezone setting is set to UTC [#8916](https://github.com/grafana/grafana/issues/8916), thx [@ctide](https://github.com/ctide)
## Minor
* **SMTP**: Make it possible to set specific EHLO for smtp client. [#9319](https://github.com/grafana/grafana/issues/9319)
......
......@@ -195,7 +195,8 @@ class TimeSrv {
from: moment.isMoment(this.time.from) ? moment(this.time.from) : this.time.from,
to: moment.isMoment(this.time.to) ? moment(this.time.to) : this.time.to,
};
var timezone = this.dashboard && this.dashboard.getTimezone ? this.dashboard.getTimezone() : 'local';
var timezone = this.dashboard && this.dashboard.getTimezone();
return {
from: dateMath.parse(raw.from, false, timezone),
......
......@@ -217,10 +217,8 @@ class MetricsPanelCtrl extends PanelCtrl {
"__interval_ms": {text: this.intervalMs, value: this.intervalMs},
});
var timezone = this.dashboard.getTimezone ? this.dashboard.getTimezone() : 'local';
var metricsQuery = {
timezone: timezone,
timezone: this.dashboard.getTimezone(),
panelId: this.panel.id,
range: this.range,
rangeRaw: this.range.raw,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment