-
Notifications
You must be signed in to change notification settings - Fork 24.7k
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: Add DateFormatter interface for java time parsing #33467
Merged
spinscale
merged 11 commits into
elastic:master
from
spinscale:1809-java-time-fix-epoch-milli-refactoring
Sep 14, 2018
Merged
Core: Add DateFormatter interface for java time parsing #33467
spinscale
merged 11 commits into
elastic:master
from
spinscale:1809-java-time-fix-epoch-milli-refactoring
Sep 14, 2018
Commits on Sep 6, 2018
-
Core: Add DateFormatter interface for java time parsing
The existing approach used date formatters when a format based string like `date_time||epoch_millis` was used, instead of the custom code. In order to properly solve this, a new interface called `DateFormatter` has been added, which now can be implemented for custom formatters. Currently there are two implementations, one using java time and one doing the epoch_millis formatter, which simply parses a number and then converts it to a date in UTC timezone. The DateFormatter interface now also has a method to retrieve the name of the formatter, which is needed for mapping changes anyway. The existing `CompoundDateTimeFormatter` class has been removed, the name was not really nice anyway. One more minor change is the fact, that the new java time using FormatDateFormatter does not try to parse the date with its printer implementation first (which might be a strict one and fail), but a printer can now be specified in addition. This saves one potential failure/exception when parsing less strict dates. If only a printer is specified, the printer will also be used as a parser.
Configuration menu - View commit details
-
Copy full SHA for 34aca34 - Browse repository at this point
Copy the full SHA 34aca34View commit details -
Configuration menu - View commit details
-
Copy full SHA for 1208deb - Browse repository at this point
Copy the full SHA 1208debView commit details -
Configuration menu - View commit details
-
Copy full SHA for cb327eb - Browse repository at this point
Copy the full SHA cb327ebView commit details -
Configuration menu - View commit details
-
Copy full SHA for 64de3c1 - Browse repository at this point
Copy the full SHA 64de3c1View commit details
Commits on Sep 7, 2018
-
Configuration menu - View commit details
-
Copy full SHA for 2eba303 - Browse repository at this point
Copy the full SHA 2eba303View commit details -
Configuration menu - View commit details
-
Copy full SHA for cf1613b - Browse repository at this point
Copy the full SHA cf1613bView commit details
Commits on Sep 8, 2018
-
Configuration menu - View commit details
-
Copy full SHA for 0950be9 - Browse repository at this point
Copy the full SHA 0950be9View commit details -
Configuration menu - View commit details
-
Copy full SHA for b05fdce - Browse repository at this point
Copy the full SHA b05fdceView commit details -
Configuration menu - View commit details
-
Copy full SHA for 754c884 - Browse repository at this point
Copy the full SHA 754c884View commit details
Commits on Sep 9, 2018
-
Configuration menu - View commit details
-
Copy full SHA for bfa704e - Browse repository at this point
Copy the full SHA bfa704eView commit details
Commits on Sep 14, 2018
-
Configuration menu - View commit details
-
Copy full SHA for f778ae3 - Browse repository at this point
Copy the full SHA f778ae3View commit details
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.