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

Timezone change in Kibana not reflecting on existing visualization #34784

Closed
enVolt opened this issue Apr 9, 2019 · 3 comments · Fixed by #34795
Closed

Timezone change in Kibana not reflecting on existing visualization #34784

enVolt opened this issue Apr 9, 2019 · 3 comments · Fixed by #34795
Assignees
Labels
bug Fixes for quality problems that affect the customer experience Feature:Visualizations Generic visualization features (in case no more specific feature label is available) regression Team:Visualizations Visualization editors, elastic-charts and infrastructure

Comments

@enVolt
Copy link

enVolt commented Apr 9, 2019

Kibana version:
6.6.0

Elasticsearch version:
6.6.0

Server OS version:
Linux elk.cloud 3.10.0-957.1.3.el7.x86_64 #1 SMP Thu Nov 29 14:49:43 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux

Browser version:
Firefox Quantum 66.0.2 (64-bit)

Browser OS version:
macOS Mojave 10.14

Original install method (e.g. download page, yum, from source, etc.):
Yum

Describe the bug:
My Kibana was configured to use Browser's default timezone, and I created a few visualizations.

Later I change my timezone to UTC. It didn't reflect on the existing visualization. I got a query from my team, that data is not exactly valid.

Later when debugging I verified from the network call, that timezone being sent is the one which was Browser's TZ at the time of creating visualization.

https://discuss.elastic.co/t/setting-a-timezone-for-a-visualisation/129509
^ Basis on this it looks like a bug.

(Kibana 6.6.0)
Steps to reproduce:

  1. Create visualization, add it to a dashboard.
  2. Change timezone to UTC from Kibana settings.
  3. Dashboard reports data in the same timezone which was when you created visualization (links to styles and js #1)

Expected behavior:

  1. Dashboard should reflect data in new timezone

Screenshots (if relevant):
image

Errors in browser console (if relevant):
NA

Provide logs and/or server output (if relevant):
NA

Any additional context:
I tried exporting the Kibana objects, in visState time_zone is also saved.

(originally asked on forum - https://discuss.elastic.co/t/timezone-change-in-kibana-not-reflecting-on-existing-visualization/175566)

@timroes timroes added Feature:Visualizations Generic visualization features (in case no more specific feature label is available) bug Fixes for quality problems that affect the customer experience Team:Visualizations Visualization editors, elastic-charts and infrastructure labels Apr 9, 2019
@elasticmachine
Copy link
Contributor

Pinging @elastic/kibana-app

@timroes
Copy link
Contributor

timroes commented Apr 9, 2019

That is indeed a bug. Technical explanation here: We added a timezone parameter to the date_histogram AggConfig since we needed it for rollup support to be overwritten. The default value was the currently configured timezone. Unfortunately that means once saving the visualization the timezone (whether it was set from the rollup job or from the Kibana setting) was now stored in the saved object of the visualization and will never change for that visualization, if you switch the Kibana time zone.

That's not a desired behavior and we should make sure the time_zone parameter won't be stored and I would also suggest we build a migration for all vis saved objects that remove the time_zone from the saved objects again, so users who have created a visualization between 6.5 and now are not forever stuck with those visualization on that bug.

@enVolt
Copy link
Author

enVolt commented Apr 10, 2019

As a quick workaround - I exported all the objects, modified the time_zone field to UTC in the exported JSON file, and imported in Kibana.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Fixes for quality problems that affect the customer experience Feature:Visualizations Generic visualization features (in case no more specific feature label is available) regression Team:Visualizations Visualization editors, elastic-charts and infrastructure
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants