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

Adds time zone to date_range bucket aggregation #37576

Merged

Conversation

TinaHeiligers
Copy link
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
Contributor

💚 Build Succeeded

@kertal kertal self-requested a review May 31, 2019 15:11
Copy link
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

@elasticmachine
Copy link
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 Visualization editors, elastic-charts and infrastructure label Jul 9, 2019
@elasticmachine
Copy link
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 Visualization editors, elastic-charts and infrastructure 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