Github user barrotsteindev commented on a diff in the pull request:
https://github.com/apache/lucene-solr/pull/428#discussion_r207692433
--- Diff:
solr/core/src/test/org/apache/solr/update/processor/ParsingFieldUpdateProcessorsTest.java
---
@@ -50,10 +55,9 @@ public void testParseDateRoundTrip() throws Exception {
String dateString = "2010-11-12T13:14:15.168Z";
SolrInputDocument d = processAdd("parse-date", doc(f("id", "9"),
f("date_dt", dateString)));
assertNotNull(d);
- DateTimeFormatter dateTimeFormatter = ISODateTimeFormat.dateTime();
- DateTime dateTime = dateTimeFormatter.parseDateTime(dateString);
+ ZonedDateTime localDateTime = ZonedDateTime.parse(dateString,
DateTimeFormatter.ISO_DATE_TIME);
assertTrue(d.getFieldValue("date_dt") instanceof Date);
- assertEquals(dateTime.getMillis(), ((Date)
d.getFieldValue("date_dt")).getTime());
+
assertEquals(localDateTime.withZoneSameInstant(ZoneOffset.UTC).toInstant().toEpochMilli(),
((Date) d.getFieldValue("date_dt")).getTime());
--- End diff --
You are right. I have pushed a commit to address this issue. I will try and
look into other areas that could be improved/simplified.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]