Epoch_millis has a maximum of 13 digits - Joda time accepts a long

(G Richard Bellamy) #1

In the documentation for date formats, epoch_millis has a maximum char length of 13 (year range of 1653 and 2286).

Also true for epoch_seconds.

Elasticsearch uses DateTime(millis, DateTimeZone.UTC) to construct an immutable Joda DateTime, where millis is a Java Long value. millis can certainly accept more than 13 chars of digits.

I'd like to understand why this limit exists when dealing with epochs.

Cross-post alert:
I've opened a GitHub issue and have a PR available, pending the outcome of this discussion.

(Daniel Mitterdorfer) #2

(Daniel Mitterdorfer) #3

Marked as closed as the mentioned PR https://github.com/elastic/elasticsearch/pull/18509 has already been merged.