Skip to content

Commit

Permalink
Add note about optional times and epochs (elastic#105786) (elastic#10…
Browse files Browse the repository at this point in the history
  • Loading branch information
benwtrent authored Mar 5, 2024
1 parent eade2a6 commit f0eed82
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions docs/reference/mapping/params/format.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,11 @@ The following tables lists all the defaults ISO formats supported:
(separated by `T`), is optional.
Examples: `yyyy-MM-dd'T'HH:mm:ss.SSSZ` or `yyyy-MM-dd`.

NOTE: When using `date_optional_time`, the parsing is lenient and will attempt to parse
numbers as a year (e.g. `292278994` will be parsed as a year). This can lead to unexpected results
when paired with a numeric focused format like `epoch_second` and `epoch_millis`.
It is recommended you use `strict_date_optional_time` when pairing with a numeric focused format.

[[strict-date-time-nanos]]`strict_date_optional_time_nanos`::

A generic ISO datetime parser, where the date must include the year at a minimum, and the time
Expand Down

0 comments on commit f0eed82

Please sign in to comment.