Skip to content

Adds time zone to date_range bucket aggregation#37576

Merged
TinaHeiligers merged 2 commits intoelastic:masterfrom
TinaHeiligers:date_range_metric_timezone
May 31, 2019
Merged

Adds time zone to date_range bucket aggregation#37576
TinaHeiligers merged 2 commits intoelastic:masterfrom
TinaHeiligers:date_range_metric_timezone

Conversation

@TinaHeiligers
Copy link
Copy Markdown
Contributor

Summary

Adds the time zone to the data_range bucket aggregation following the implementation in date_histogram.
Resolves #34535.

From the original issue:
Describe the bug:
The visualization 'metric' doesn't handle the configured Timezone correctly.

Steps to reproduce:

Set the Timezone in the 'advanced settings' of Kibana to 'Europe/Amsterdam'
Create a new 'metric' visualization.
Split group and select the 'date range' aggregation
Select a Date Field
Set from to 'now-2d/d'
Set to to 'now-1d/d'
The label of visualization displays "April 2nd 2019, 02:00:00.000 to April 3rd 2019, 02:00:00.000 - Count"
Notice that the from (and the to) have a time of 2 o'clock.

Before:
timezone_not_in_date_range

After:
timezone_in_date_range_agg

Checklist

Use strikethroughs to remove checklist items you don't feel are applicable to this PR.

- [ ] This was checked for cross-browser compatibility, including a check against IE11
- [ ] Any text added follows EUI's writing guidelines, uses sentence case text and includes i18n support
- [ ] Documentation was added for features that require explanation or tutorials

For maintainers

@elasticmachine
Copy link
Copy Markdown
Contributor

💚 Build Succeeded

@kertal kertal self-requested a review May 31, 2019 15:11
Copy link
Copy Markdown
Member

@kertal kertal left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code LGTM, tested locally with Chrome

@kertal kertal added release_note:fix and removed backport This PR is a backport of another PR labels May 31, 2019
@elasticmachine
Copy link
Copy Markdown
Contributor

💚 Build Succeeded

@TinaHeiligers TinaHeiligers merged commit bc8beac into elastic:master May 31, 2019
TinaHeiligers added a commit to TinaHeiligers/kibana that referenced this pull request May 31, 2019
@TinaHeiligers TinaHeiligers deleted the date_range_metric_timezone branch May 31, 2019 23:02
@gchaps gchaps added the Team:Visualizations Team label for Lens, elastic-charts, Graph, legacy editors (TSVB, Visualize, Timelion) t// label Jul 9, 2019
@elasticmachine
Copy link
Copy Markdown
Contributor

Pinging @elastic/kibana-app

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

release_note:fix Team:Visualizations Team label for Lens, elastic-charts, Graph, legacy editors (TSVB, Visualize, Timelion) t// v7.3.0 v8.0.0

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Timezone problem in metric visualization with date range bucket

4 participants