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

dateFormat:tz: browser doesn't work, shows UTC #57457

Closed
LeeDr opened this issue Feb 12, 2020 · 4 comments
Closed

dateFormat:tz: browser doesn't work, shows UTC #57457

LeeDr opened this issue Feb 12, 2020 · 4 comments
Assignees
Labels
blocker bug Fixes for quality problems that affect the customer experience regression Team:Visualizations Visualization editors, elastic-charts and infrastructure v7.6.1

Comments

@LeeDr
Copy link

LeeDr commented Feb 12, 2020

⚠️ This is a universal issue in 7.6.0, that will happen to anyone and will be fixed in the next patch version. We're sorry for the inconvenience. The current workaround is to don't use the "Browser" timezone under Management > Advanced Settings, but setting this to a specific one.

Kibana version: 7.6.0

Elasticsearch version: 7.6.0

Server OS version: CentOS7

Browser version: Chrome 79

Browser OS version: Windows 10

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

Describe the bug: The default dateFormat:tz: setting is browser, which implies that Elasticsearch timestamps should be converted to the local time of the user's browser. But it appears that doesn't happen and the times are not converted but left in UTC timezone.

Steps to reproduce:

  1. check Management > Advanced settings > dateFormat:tz: browser to see that it's at the default browser
  2. go to Discover and add a filter on any doc in an index that is time-based. You can do this by expanding a doc and clicking the +magnifying glass next to the _id field
  3. note the timestamp on that doc
  4. go back to Advanced settings and set dateFormat:tz: UTC and save.
  5. go back to Discover and look at the timestamp on your filtered doc. Unless your timezone really is UTC, the timestamp on the doc should have changed.
  6. change Advanced settings > dateFormat:tz: browser to your local timezone
  7. check the timestamp on the doc again (for me, US/Central, the time was changed by -6 hours)
    Note: You might need to use the browser refresh to make sure Discover really reloads with the new dateFormat:tz setting.
  8. Pin the filter by clicking on it in Discover and select Pin across all apps
    image
  9. Go to Visualize and create a new Data Table with the same index
  10. In the Buckets configuration block, Split Rows with Date Histogram and apply that. Here we should see the timezone of that one doc again. Try the different dateFormat:tz settings, UTC, browser, and your specific local timezone.
    image

In your browser, open the developer tools and check what the browser thinks your timezone is;
image

Expected behavior: The default browser setting should show times in the user's local timezone.

Screenshots (if relevant): see above

Errors in browser console (if relevant): none

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

Any additional context: I didn't check all apps and I don't know if one common set of code affects all apps or if we need to test this across all apps.

@LeeDr LeeDr added bug Fixes for quality problems that affect the customer experience blocker regression Team:Visualizations Visualization editors, elastic-charts and infrastructure v7.6.1 labels Feb 12, 2020
@elasticmachine
Copy link
Contributor

Pinging @elastic/kibana-app (Team:KibanaApp)

@timroes
Copy link
Contributor

timroes commented Feb 13, 2020

Broken by #47948, since the server side field formatter is now also used for client side code.

@elasticmachine
Copy link
Contributor

Pinging @elastic/kibana-app-arch (Team:AppArch)

@rodmaz
Copy link

rodmaz commented Feb 13, 2020

Same problem here:

Kibana version: 7.6.0
Elasticsearch version: 7.6.0
Browser version: 13.0.5 (15608.5.11)
Browser OS version: macOS 10.15.3 (19D76)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
blocker bug Fixes for quality problems that affect the customer experience regression Team:Visualizations Visualization editors, elastic-charts and infrastructure v7.6.1
Projects
None yet
Development

No branches or pull requests

6 participants