Getting error when inserting value as -561600000 for date column

Versions (relevant - OpenSearch/Dashboard/Server OS/Browser):
OpenSearch version 1.3 onwards

Describe the issue:
When inserting documents with value as -561600000( Milliseconds of 1969/12/25 12:00:00 PM GMT) into date field. Getting below error,

failed to parse field [column1] of type [date] in document with id ‘800d6acc-9192-4bb1-b2cb-c810b77f179e’. Preview of field’s value: ‘-561600000’",“caused_by”:{“type”:“arithmetic_exception”,“reason”:“arithmetic_exception: long overflow”}}, “status”:400

But successfully inserting -561600000000 ( Milliseconds of 1952/03/16 12:00:00 AM GMT). This seems inconsistent behavior where not allowing date value close to 1969’s but allowing 1950’s value.

Note: ElasticSearch don’t have this issue. Able to store -561600000 value successfully. Noticed this behavior change when migrating from ES to OpenSearch.

Any work around to this fix? Better to have consistent behavior when storing negative milliseconds.

Configuration:
Index created with OpenSearch 1.3.x.
Mapping for this column: "column1":{"type":"date"}
NOTE: not using any custom format types.

Relevant Logs or Screenshots:

failed to parse field [column1] of type [date] in document with id ‘800d6acc-9192-4bb1-b2cb-c810b77f179e’. Preview of field’s value: ‘-561600000’",“caused_by”:{“type”:“arithmetic_exception”,“reason”:“arithmetic_exception: long overflow”}}, “status”:400

@Vbharathy I’ve got the same result in 2.16. Try this mapping instead.

PUT my-date-index2
{
  "mappings": {
    "properties": {
      "my_date_field": {
        "type": "date",
        "format": "epoch_millis"  // Custom format for Unix timestamp in milliseconds
      }
    }
  }
}

It worked for both reported values.

@pablo Thank you for suggestions and changing default format is working as you mentioned. Mainly trying to see any other options like fixing the codebase, as in ElasticSearch (Change year max digits for strict_date_optional_time and date_optional_time by pgomulka · Pull Request #73034 · elastic/elasticsearch · GitHub). This helps to avoid updating mappings for existing indices.