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

Fix timezone in rendered images #229

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

dgoetz
Copy link

@dgoetz dgoetz commented Oct 23, 2019

This pull request fixes the timezone in rendered images by adding the timezone set in Icinga Web 2 (or if unset browser settings) to the url. Without it the timezone of the data is taken resulting in a mix of dates shown. Seen this behaviour while setting up a satellite with its own webinterface in Singapore (timezone set everywhere to Asia/Singapore) and using a browser with German settings (timezone is Europe/Berlin).

CC: @pdorschner

dgoetz and others added 2 commits October 23, 2019 11:43
Signed-off-by: Dirk Goetz <dirk.goetz@netways.de>
@Mikesch-mp
Copy link
Owner

Normaly there is no need to set a TZ for a dashboard url. Are you using the docker renderer?
IF yes you have to set a timezone also for the docker container.

@dgoetz
Copy link
Author

dgoetz commented Oct 25, 2019

No, we ware using Grafana in the current version installed on the same system. In Grafana we get the correct (browser) timezone but in the rendered images in Icinga Web 2 we get the timezone based on the data (backend is Graphite 0.9.16 from EPEL).

@Mikesch-mp
Copy link
Owner

The renderer uses the timezone of the system it runs on, which is from my few correct. if you are in a different timezone with your workstation then the system, you should change you workstations timezone.

You are correct for rendered images should shown the timezone of the browser whenever possible, but you PR is a) only half of the needed and b) for iframe mode not needed, because iframe is not done by Grafana renderer. Grafana always uses local browser timezone or if set hard to UTC.

@pdorschner
Copy link

Hello,
I'm the original author of this PR and I try to fix it. But I need to know what is needed for point (a to make this PR to be accepted.

Best regards

@Mikesch-mp
Copy link
Owner

Please redo for 2.0.0 aftter its released

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants