-
Notifications
You must be signed in to change notification settings - Fork 25k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add support for negtive epoch timestamps (#80208)
* support negative epoch_timestamps ES 7.0 removed support for negative timestamps in date parsing. This was due to internally migrating to Java 8's datetime classes, in particular the representation of a date as a set of integer fields, Instant. This change adds back the support for negative epoch timestamps, with both epoch millis and epoch seconds parsers. The implementation separates parsing of negative values into a separate Instant field, holding only the "negative". By having this separate from the seconds portion of the timestamp, the negation can be held onto, even when the seconds or milliseconds are 0, where Java's parser would have thrown away the negative. Co-authored-by: Ryan Kophs <[email protected]>
- Loading branch information
Ryan Kophs
and
Ryan Kophs
authored
Mar 24, 2022
1 parent
45d3b96
commit c0799ec
Showing
5 changed files
with
362 additions
and
33 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
pr: 80208 | ||
summary: Add support for negtive epoch timestamps | ||
area: Infra/Core | ||
type: enhancement | ||
issues: | ||
- 79135 | ||
- 72123 | ||
- 40983 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.