Add note about negative epoch times (#61379)

This commit adds a reminder to date type documentation that negative
epoch times are not supported.

relates #40983
This commit is contained in:
Ryan Ernst 2020-08-20 13:51:57 -07:00 committed by Ryan Ernst
parent 08dbd6d989
commit 00b56bf007
No known key found for this signature in database
GPG Key ID: 5F7EA39E15F54DCE

View File

@ -10,6 +10,9 @@ JSON doesn't have a date data type, so dates in Elasticsearch can either be:
* a long number representing _milliseconds-since-the-epoch_.
* an integer representing _seconds-since-the-epoch_.
NOTE: Values for _milliseconds-since-the-epoch_ and _seconds-since-the-epoch_
must be non-negative. Use a formatted date to represent dates before 1970.
Internally, dates are converted to UTC (if the time-zone is specified) and
stored as a long number representing milliseconds-since-the-epoch.