Skip to content
This repository was archived by the owner on Jan 15, 2025. It is now read-only.

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
@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 subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants