Skip to content

Comments

ESQL: Added timezone support to date_format and date_parse#138517

Merged
ivancea merged 30 commits intoelastic:mainfrom
ivancea:esql-date-format-timezones
Dec 19, 2025
Merged

ESQL: Added timezone support to date_format and date_parse#138517
ivancea merged 30 commits intoelastic:mainfrom
ivancea:esql-date-format-timezones

Conversation

@ivancea
Copy link
Contributor

@ivancea ivancea commented Nov 24, 2025

TimeZone configurations are snapshot-only, and so is its usage in functions.

Adds timezone handling to DATE_FORMAT and DATE_PARSE.

@ivancea ivancea added >feature Team:Analytics Meta label for analytical engine team (ESQL/Aggs/Geo) :Analytics/ES|QL AKA ESQL labels Nov 24, 2025
@elasticsearchmachine
Copy link
Collaborator

Hi @ivancea, I've created a changelog YAML for you.

@ivancea ivancea changed the title ESQL: Added timezone support to date_format ESQL: Added timezone support to date_format and date_parse Nov 24, 2025
@github-actions
Copy link
Contributor

ℹ️ Important: Docs version tagging

👋 Thanks for updating the docs! Just a friendly reminder that our docs are now cumulative. This means all 9.x versions are documented on the same page and published off of the main branch, instead of creating separate pages for each minor version.

We use applies_to tags to mark version-specific features and changes.

Expand for a quick overview

When to use applies_to tags:

✅ At the page level to indicate which products/deployments the content applies to (mandatory)
✅ When features change state (e.g. preview, ga) in a specific version
✅ When availability differs across deployments and environments

What NOT to do:

❌ Don't remove or replace information that applies to an older version
❌ Don't add new information that applies to a specific version without an applies_to tag
❌ Don't forget that applies_to tags can be used at the page, section, and inline level

🤔 Need help?

@ivancea ivancea marked this pull request as ready for review November 27, 2025 15:25
@elasticsearchmachine
Copy link
Collaborator

Pinging @elastic/es-analytical-engine (Team:Analytics)

@ivancea ivancea marked this pull request as draft November 27, 2025 15:26
@ivancea ivancea marked this pull request as ready for review December 5, 2025 17:22
Copy link
Contributor Author

@ivancea ivancea Dec 16, 2025

Choose a reason for hiding this comment

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

Kibana signatures were also wrong if the first parameter of a function was optional, if the second parameter wasn't.
They were rendered as "1 optional param" instead of "1 required param (the second one)". For a real example, it was "allowing" DATE_FORMAT(), when that wouldn't work.

This is how it looks now in Kibana. Note the "expected ([date])", which makes no sense as it's not optional when alone.

Image

@ivancea ivancea added the ES|QL-ui Impacts ES|QL UI label Dec 16, 2025
@elasticsearchmachine
Copy link
Collaborator

Pinging @elastic/kibana-esql (ES|QL-ui)

Copy link
Contributor

@cimequinox cimequinox left a comment

Choose a reason for hiding this comment

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

  • Most of the changes appear to be the expected configuration plumbing.
  • I had no difficulty following the code apart from a few index calculations
    in the tests and doc generation where I couldn't quite convince myself
    the index wouldn't go out of bound. The assert added by @ivancea helped.
  • I did see a few trivial things like .debug and left a few trivial suggestions.
    I did not notice the .debug improved the output of the neighboring .info.

@ivancea ivancea requested a review from cimequinox December 17, 2025 12:40
Copy link
Contributor

@cimequinox cimequinox left a comment

Choose a reason for hiding this comment

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

Thank you for addressing my comments.

@ivancea ivancea merged commit 48a591d into elastic:main Dec 19, 2025
40 of 41 checks passed
@ivancea ivancea deleted the esql-date-format-timezones branch December 19, 2025 10:18
szybia added a commit to szybia/elasticsearch that referenced this pull request Dec 19, 2025
* upstream/main: (25 commits)
  Add spec for project routing CRUD REST API endpoints (elastic#139634)
  Implement AllSupportedFIeldsTestCase for TDigest (elastic#139744)
  Mute elastic#139802 (elastic#139803)
  fix(logsdb): batch bulk indexing to prevent OOM in challenge tests (elastic#139770)
  Documentation for semantic_text auto pre-filtering (elastic#139749)
  Always do bulk scoring for rescoring when possible (elastic#139777)
  Optimize script sorts that do not require query scores (elastic#139748)
  Bump versions after 9.1.9 release
  Update branches.json for 9.1.9 release
  Bump versions after 9.2.3 release
  Prune changelogs after 8.19.9 release
  Bump versions after 8.19.9 release
  Update branches.json for 8.19.9 release
  Finalize docs for v9.2.3 release (elastic#139795)
  ESQL: Added timezone support to date_format and date_parse (elastic#138517)
  Update branches.json for 9.2.3 release
  Finalize docs for v9.1.9 release (elastic#139796)
  Switch inline stats to GA in docs (elastic#139753)
  Validate license in CPS (elastic#139105)
  FIPS 140-3 support with BC FIPS 2.0.x (elastic#139319)
  ...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

:Analytics/ES|QL AKA ESQL ES|QL-ui Impacts ES|QL UI >feature Team:Analytics Meta label for analytical engine team (ESQL/Aggs/Geo) v9.4.0

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants