Skip to content

[Discover] Search is failing when a time zone is set in Advanced Settings #70352

@tsullivan

Description

@tsullivan

Kibana version: 8.0.0

Elasticsearch version: 8.0.0

Server OS version: Linux

Browser version: Chrome

Browser OS version: Windows

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

Describe the bug:
I create a saved search in Discover, and it's loading fine. But when I got to Advanced Settings and change the dateFormat:tz setting from Browser (default) to MST, Discover stops being able to show the search.

Steps to reproduce:

  1. Use test data
PUT my_index
{
  "mappings": {
      "properties": {
        "date": {
          "type": "date" 
        },
        "name": {
          "type": "keyword" 
        }
      }
    }
}

PUT my_index/_doc/1
{
  "date": "2019-01-01",
  "name": "Raiden"
} 

PUT my_index/_doc/2
{
  "date": 1546300800001,
  "name": "Sub-Zero"
} 

PUT my_index/_doc/3
{
  "date": "2019-01-01T12:10:30Z",
  "name": "Scorpion"
} 
  1. Create a basic index pattern
  2. Create a saved search in Discover based on the index pattern
  3. Change dateFormat:tz setting from default in Advanced Settings to MST
  4. Reload the saved search

Expected behavior:
Discover shows the data with the date values formatted in the set time zone

Screenshots (if relevant):

  • image
  • image
  • image
  • image
  • image
  • image

Errors in browser console (if relevant):

{"statusCode":400,"error":"Bad Request","message":"[x_content_parse_exception] [1:172] [date_histogram] failed to parse field [time_zone]","attributes":{"error":{"root_cause":[{"type":"x_content_parse_exception","reason":"[1:172] [date_histogram] failed to parse field [time_zone]"}],"type":"x_content_parse_exception","reason":"[1:172] [date_histogram] failed to parse field [time_zone]","caused_by":{"type":"zone_rules_exception","reason":"Unknown time-zone ID: MST"}}}}

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

Any additional context:

Metadata

Metadata

Assignees

Labels

Feature:SearchQuerying infrastructure in KibanaTeam:VisualizationsTeam label for Lens, elastic-charts, Graph, legacy editors (TSVB, Visualize, Timelion) t//bugFixes for quality problems that affect the customer experienceimpact:mediumAddressing this issue will have a medium level of impact on the quality/strength of our product.loe:mediumMedium Level of Effort

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions