HoustonPutman commented on code in PR #913: URL: https://github.com/apache/solr/pull/913#discussion_r906209908
########## solr/solrj/src/java/org/apache/solr/common/util/JavaBinCodec.java: ########## @@ -1080,6 +1083,15 @@ public boolean writePrimitive(Object val) throws IOException { daos.writeByte(DATE); daos.writeLong(((Date) val).getTime()); return true; + } else if (val instanceof Instant) { + daos.writeByte(DATE); + daos.writeLong(((Instant) val).toEpochMilli()); + } else if (val instanceof LocalDate) { + daos.writeByte(DATE); + daos.writeLong(((LocalDate) val).toEpochDay()); Review Comment: I think EpochDay is the number of Days since epoch. ```suggestion daos.writeLong(((LocalDate) val).atStartOfDay(ZoneId.systemDefault()).toEpochSecond()); ``` with the `ZoneId.systemDefault()`, you might be able to support `LocalDateTime` as well. On the other hand, we don't necessarily know what zone is correct, and the system default might be wrong. Maybe we just remove the `LocalDate` support, like you did `LocalDateTime`. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: issues-unsubscr...@solr.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: issues-unsubscr...@solr.apache.org For additional commands, e-mail: issues-h...@solr.apache.org