AndrewJSchofield commented on code in PR #18611: URL: https://github.com/apache/kafka/pull/18611#discussion_r1922780851
########## connect/api/src/test/java/org/apache/kafka/connect/data/ValuesTest.java: ########## @@ -901,8 +902,12 @@ public void shouldConvertDateValues() { assertEquals(currentDate, d2); // ISO8601 strings - accept a string matching pattern "yyyy-MM-dd" + // Values.convertToDate convert the "yyyy-MM-dd" string will miss the time and timezone information, + // so we need to adjust the date from the current timezone to UTC0 + TimeZone tz = TimeZone.getDefault(); + java.util.Date currentDate3 = new java.util.Date(current.getTime() - currentMillis - tz.getOffset(current.getTime())); java.util.Date d3 = Values.convertToDate(Date.SCHEMA, LocalDate.ofEpochDay(days).format(DateTimeFormatter.ISO_LOCAL_DATE)); - assertEquals(currentDate, d3); Review Comment: Yes, I'm not sure either. But I can believe it's possible to write a test that is timezone-dependent. -- 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: jira-unsubscr...@kafka.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org