Conversation
|
Pinging @elastic/kibana-esql (Team:ESQL) |
ThomThomson
left a comment
There was a problem hiding this comment.
Presentation team additions looking nice and straightforward. LGTM!
markov00
left a comment
There was a problem hiding this comment.
Code review only, LGTM thanks
sddonne
left a comment
There was a problem hiding this comment.
Code review only, ES|QL lgtm.
mohamedhamed-ahmed
left a comment
There was a problem hiding this comment.
Code review only, LGTM! Thank you
mykolaharmash
left a comment
There was a problem hiding this comment.
significant events changes LGTM
💚 Build Succeeded
Metrics [docs]Public APIs missing comments
Async chunks
Page load bundle
Unknown metric groupsAPI count
History
|
…53912) ## Summary Closes elastic/kibana-team#2888 > [!NOTE] > Timezone support was added in #247917 and it works out of the box. - Enables ES|QL conversion for all timezones by removing the timezone check in the `generate_esql_query` method. - Deletes the related failure reason since is no longer necessary. - Removes the timezone related test in the `generate_esql_query` test since we have removed the timezone checks in the `generate_esql_query` method. ### Screen recording Time zone: America/Jujuy https://github.com/user-attachments/assets/d815769c-bb81-487c-8b85-faf3b02473aa ## Checklist - [x] [Unit or functional tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html) were updated or added to match the most common scenarios - [x] The PR description includes the appropriate Release Notes section, and the correct `release_note:*` label is applied per the [guidelines](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process) - [x] Review the [backport guidelines](https://docs.google.com/document/d/1VyN5k91e5OVumlc0Gb9RPa3h1ewuPE705nRtioPiTvY/edit?usp=sharing) and apply applicable `backport:*` labels.
…astic#253912) ## Summary Closes elastic/kibana-team#2888 > [!NOTE] > Timezone support was added in elastic#247917 and it works out of the box. - Enables ES|QL conversion for all timezones by removing the timezone check in the `generate_esql_query` method. - Deletes the related failure reason since is no longer necessary. - Removes the timezone related test in the `generate_esql_query` test since we have removed the timezone checks in the `generate_esql_query` method. ### Screen recording Time zone: America/Jujuy https://github.com/user-attachments/assets/d815769c-bb81-487c-8b85-faf3b02473aa ## Checklist - [x] [Unit or functional tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html) were updated or added to match the most common scenarios - [x] The PR description includes the appropriate Release Notes section, and the correct `release_note:*` label is applied per the [guidelines](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process) - [x] Review the [backport guidelines](https://docs.google.com/document/d/1VyN5k91e5OVumlc0Gb9RPa3h1ewuPE705nRtioPiTvY/edit?usp=sharing) and apply applicable `backport:*` labels.
## Summary Adds a **Timezone handling** section to the [ES|QL in Kibana](https://www.elastic.co/docs/explore-analyze/query-filter/languages/esql-kibana) page, under the existing "Filter by time" section. This is Kibana-specific content not covered in the ES|QL reference: it explains how Kibana controls the timezone used in ES|QL queries. **What it covers:** - By default, Kibana applies the **Time zone** (`dateFormat:tz`) [advanced setting](https://www.elastic.co/docs/reference/kibana/configuration-reference/advanced-settings) to all ES|QL queries in Discover, dashboards, alerting, and Maps. - A warning advising against using `SET time_zone` in Kibana apps: the directive changes how dates are computed by ES, but Kibana still displays timestamps using `dateFormat:tz`, which can produce confusing results. Based on feedback from @stratoula and @ghudgins. **Verified against the Kibana codebase:** - `dateFormat:tz` is passed to ES|QL queries via `data/common/search/expressions/esql.ts` (line 185) - `SET time_zone` is intentionally excluded from autocomplete in `kbn-esql-language/scripts/generate_settings.ts` **Manually tested using `DATE_FORMAT("yyyy-MM-dd HH:mm z", @timestamp)` to confirm the timezone applied:** - **Discover**: returns the timezone from the `dateFormat:tz` advanced setting ✅ - **Data Visualizer**: same behavior as Discover ✅ - **Dev Tools (no `time_zone` param)**: returns `Z` (UTC) ✅ - **Discover & Data Visualizer with `SET time_zone = "America/New_York"`**: returns `EST`/`EDT`, overriding the advanced setting ✅ Closes #4962 Supersedes #5456 (timezone content consolidated into this PR). Related Kibana PR: - [elastic/kibana#247917](elastic/kibana#247917) — ES|QL timezone support ## Generative AI disclosure 1. Did you use a generative AI (GenAI) tool to assist in creating this contribution? - [x] Yes - [ ] No 2. If you answered "Yes" to the previous question, please specify the tool(s) and model(s) used (e.g., Google Gemini, OpenAI ChatGPT-4, etc.). Tool(s) and model(s) used: claude-4.6-sonnet-medium and claude-4.6-opus-high-thinking in Cursor
Summary
Closes #172221
ES|QL now supports timezones! This PR is adding support to:
There are usages (such as in ML) that are still not supporting it. The teams need to handle it themselves. I didnt do it mostly for 2 reasons:
When we will merge
I am going to merge it after the next serverless release (next week) to be sure that all the ES serverless instances have the new request parameter already.