Kibana: `dateFormat:tz: browser` doesn't work, shows UTC

Created on 12 Feb 2020  路  4Comments  路  Source: elastic/kibana

:warning: 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.

AppServices KibanaApp blocker bug regression v7.6.1

Most helpful comment

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)

All 4 comments

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

Broken by https://github.com/elastic/kibana/pull/47948, since the server side field formatter is now also used for client side code.

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

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)

Was this page helpful?
0 / 5 - 0 ratings

Related issues

LukeMathWalker picture LukeMathWalker  路  3Comments

timmolter picture timmolter  路  3Comments

mark54g picture mark54g  路  3Comments

tbragin picture tbragin  路  3Comments

MaartenUreel picture MaartenUreel  路  3Comments