jhmannok commented on code in PR #36519: URL: https://github.com/apache/arrow/pull/36519#discussion_r1272526219
########## java/flight/flight-sql-jdbc-core/src/test/java/org/apache/arrow/driver/jdbc/accessor/impl/calendar/ArrowFlightJdbcTimeStampVectorAccessorTest.java: ########## @@ -173,17 +176,15 @@ public void testShouldGetTimestampReturnValidTimestampWithCalendar() throws Exce TimeZone timeZone = TimeZone.getTimeZone(AMERICA_SAO_PAULO); Calendar calendar = Calendar.getInstance(timeZone); - TimeZone timeZoneForVector = getTimeZoneForVector(vector); + TimeZone finalTimeZoneForResultWithoutCalendar = ofNullable(getTimeZoneForVector(vector)) + .orElse(TimeZone.getDefault()); Review Comment: yep got it! ########## java/flight/flight-sql-jdbc-core/src/main/java/org/apache/arrow/driver/jdbc/accessor/impl/calendar/ArrowFlightJdbcTimeStampVectorAccessor.java: ########## @@ -91,14 +92,11 @@ private LocalDateTime getLocalDateTime(Calendar calendar) { long value = holder.value; LocalDateTime localDateTime = this.longToLocalDateTime.fromLong(value); + ZoneId defaultTimeZone = TimeZone.getDefault().toZoneId(); + ZoneId sourceTimeZone = nonNull(this.timeZone) ? this.timeZone.toZoneId() : + nonNull(calendar) ? calendar.getTimeZone().toZoneId() : defaultTimeZone; Review Comment: done! -- 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: github-unsubscr...@arrow.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org