-
Notifications
You must be signed in to change notification settings - Fork 25k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Core: Deprecate negative epoch timestamps #36793
Conversation
Negative timestamps are currently supported in joda time. These are dates before epoch. However, it doesn't really make sense to have a negative timestamp, since this is a modern format. Any dates before epoch can be represented with normal date formats, like ISO8601. Additionally, implementing negative epoch timestamp parsing in java time has an edge case which would more than double the code required. This commit deprecates use of negative epoch timestamps.
Pinging @elastic/es-core-infra |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I left a question.
@@ -262,49 +262,6 @@ public void testThatEpochsCanBeParsed() { | |||
assertThat(formatter.parseJoda(epochFloatValue).getMillis(), is(dateTime.getMillis())); | |||
} | |||
|
|||
public void testThatNegativeEpochsCanBeParsed() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why is this test removed? These would still be parsed by Joda, so would issue deprecation warnings? Or am I misunderstanding something?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I added it back with a warning check in efd290b
@elasticmachine test this please |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM.
@elasticmachine test this please |
Negative timestamps are currently supported in joda time. These are dates before epoch. However, it doesn't really make sense to have a negative timestamp, since this is a modern format. Any dates before epoch can be represented with normal date formats, like ISO8601. Additionally, implementing negative epoch timestamp parsing in java time has an edge case which would more than double the code required. This commit deprecates use of negative epoch timestamps.
Negative timestamps are currently supported in joda time. These are
dates before epoch. However, it doesn't really make sense to have a
negative timestamp, since this is a modern format. Any dates before
epoch can be represented with normal date formats, like ISO8601.
Additionally, implementing negative epoch timestamp parsing in java time
has an edge case which would more than double the code required. This
commit deprecates use of negative epoch timestamps.