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

Enable datasources to be able to round off to a UTC day properly #8916

Merged
merged 1 commit into from Oct 2, 2017

Conversation

ctide
Copy link
Contributor

@ctide ctide commented Jul 24, 2017

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.)

@CLAassistant
Copy link

CLAassistant commented Jul 24, 2017

CLA assistant check
All committers have signed the CLA.

@@ -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),
Copy link
Member

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

@torkelo
Copy link
Member

torkelo commented Jul 25, 2017

looks nice, please sign CLA :)

@ctide
Copy link
Contributor Author

ctide commented Jul 25, 2017

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

@cburkhart-blz
Copy link
Contributor

It's because I have 2 github accounts, fixed now.

@@ -225,6 +225,7 @@ class MetricsPanelCtrl extends PanelCtrl {
});

var metricsQuery = {
timezone: this.dashboard.timezone,
Copy link
Member

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

@ctide
Copy link
Contributor Author

ctide commented Aug 8, 2017

Fixed and rebased against current master.

@torkelo torkelo merged commit 3e0b92d into grafana:master Oct 2, 2017
@torkelo torkelo modified the milestones: 5.0, 4.6/5.0 Oct 2, 2017
torkelo added a commit that referenced this pull request Oct 2, 2017
@torkelo
Copy link
Member

torkelo commented Oct 2, 2017

merged to master, thanks for contributing & sorry for taking such a long time with it

@ctide
Copy link
Contributor Author

ctide commented Oct 2, 2017

Thanks!

@bergquist bergquist modified the milestones: 4.6/5.0, 4.6 Oct 12, 2017
@ying-jeanne ying-jeanne added the pr/external This PR is from external contributor label Apr 29, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Bug]: now/d does not respect UTC timezone setting
6 participants