-
Notifications
You must be signed in to change notification settings - Fork 8.3k
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
Fixes #12113 - Add timezone to date histogram aggregations for TSVB #13378
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
oki, but I'd also consider reusing existing timelion code for parsing timezone.
@@ -9,11 +11,20 @@ const MetricsRequestHandlerProvider = function (Private, Notifier, config, timef | |||
name: 'metrics', | |||
handler: function (vis /*, appState, uiState, queryFilter*/) { | |||
|
|||
let timezone = config.get('dateFormat:tz', 'Browser'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this is pretty much the same as: https://github.com/thomasneirynck/kibana/blob/262bcb411acc6269dbd0fba519bbee3f96b0e363/src/core_plugins/timelion/public/services/timezone.js#L6-L5
anyway we can reuse that one here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah... but we need to move it out of Timelion and put it somewhere more global. Suggestions?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
src/ui/public/vis/lib/timezone
?
fwiw, the folder structure of visualize needs work. we're thinking of consolidating. #12675.
@LeeDr Can you confirm that this fixes your original issue? |
Testing now... |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM - I compared it to a chart in Discover tab for the same index with the dateFormat:tz set to browser and to another random timezone and in both cases with the interval set to 1d or daily the counts each day are the same and the Visual Builder tooltip shows 12:00:00 AM
This PR adds the timezone to the date histogram aggregation in order to fix #12113