Github user dsmiley commented on a diff in the pull request: https://github.com/apache/lucene-solr/pull/428#discussion_r207697969 --- Diff: solr/core/src/test/org/apache/solr/update/processor/ParsingFieldUpdateProcessorsTest.java --- @@ -912,4 +904,18 @@ public void testCascadingParsers() throws Exception { } assertTrue(mixedDates.isEmpty()); } + + private Date temporalToDate(TemporalAccessor in, ZoneId timeZoneId) { + if(in instanceof OffsetDateTime) { + return Date.from(((OffsetDateTime) in).toInstant()); + } else if(in instanceof ZonedDateTime) { + return Date.from(((ZonedDateTime) in).withZoneSameInstant(timeZoneId).toInstant()); --- End diff -- This line should be `return Date.from(((ZonedDateTime) in).toInstant());` -- needn't use timeZoneId (tests pass). It's functionally equivalent but avoids a needless intermediate step.
--- --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@lucene.apache.org For additional commands, e-mail: dev-h...@lucene.apache.org