Switch default time format for ingest from Joda to Java for v7#37934
Switch default time format for ingest from Joda to Java for v7#37934droberts195 merged 3 commits intoelastic:masterfrom
Conversation
Date formats with and without the "8" prefix are now all treated as Java time formats, so that ingest does the same as mappings in this respect.
|
Pinging @elastic/es-core-infra |
|
I opened issue #37935 to discuss side effects of the fact that this change also changes the formats used for date index naming. |
spinscale
left a comment
There was a problem hiding this comment.
I left one comment, as we need to do some more work here, but I can just do that as well.
| ZonedDateTime defaultZonedDateTime = Instant.EPOCH.atZone(ZoneOffset.UTC).withYear(year); | ||
| TemporalAccessor accessor = formatter.parse(text); | ||
| long millis = DateFormatters.toZonedDateTime(accessor, defaultZonedDateTime).toInstant().toEpochMilli(); | ||
| return new DateTime(millis, timezone); |
There was a problem hiding this comment.
we are still returned a joda time class here, that we need to get rid of. I am happy to fix this in a follow up PR though
There was a problem hiding this comment.
Thanks @spinscale. I'd prefer to leave that for a followup PR as I'm sure removing Joda classes will spread out far and wide through the codebase.
|
Jenkins run elasticsearch-ci/1 |
|
I'll hold off from merging this until somebody has commented on #37935. |
* master: Expose retention leases in shard stats (elastic#37991) Make primary terms fields private in index shard (elastic#38036) ML: Add reason field in JobTaskState (elastic#38029) Log flush_stats and commit_stats in testMaybeFlush HLRC: Fix strict setting exception handling (elastic#37247) Test: Enable strict deprecation on all tests (elastic#36558) Removes typed calls from YAML REST tests (elastic#37611) Switch default time format for ingest from Joda to Java for v7 (elastic#37934) Remove deprecated Plugin#onModule extension points (elastic#37866) Geo: Fix Empty Geometry Collection Handling (elastic#37978)
|
Pinging @elastic/es-core-features |
Date formats with and without the "8" prefix are now all treated
as Java time formats, so that ingest does the same as mappings
in this respect.
Relates #27330