Negative epoch_millis sometimes throw error while indexing

Hi,

version: 7.10.1

Have a"dateOfBirth": { "type": "date" } field.

I can't index the document with the dateOfBirth:-1555200000
error : “reason”:“date_time_exception: Invalid value for Year (valid values -999999999 - 999999999): -1555200000"

But, I can index a document with dateOfBirth = -379728000000

How possible ?
I found these information, https://github.com/elastic/elasticsearch/pull/39734/files
but doesn't seem accurate because why it would work for the 2d document ?

I'm using this website to check the dates:https://currentmillis.com/

Any help would be appreciate, Thank you

Spcifying a format in the mappings helps :

"dateOfBirth": {
          "type": "date",
          "format": "epoch_millis"
        }

Does that fix the issue?

Yes totally,

I kept the question open in case someone's interested...
But I can close it

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.