jduo commented on code in PR #36519:
URL: https://github.com/apache/arrow/pull/36519#discussion_r1346213335
##########
java/flight/flight-sql-jdbc-core/src/test/java/org/apache/arrow/driver/jdbc/accessor/impl/calendar/ArrowFlightJdbcTimeStampVectorAccessorTest.java:
##########
@@ -270,8 +270,11 @@ private Timestamp getTimestampForVector(int currentRow) {
} else if (object instanceof Long) {
TimeUnit timeUnit = getTimeUnitForVector(vector);
long millis = timeUnit.toMillis((Long) object);
- long offset = TimeZone.getTimeZone(timeZone).getOffset(millis);
- expectedTimestamp = new Timestamp(millis + offset);
+
+ ZonedDateTime sourceTZDateTime = LocalDateTime
+ .ofInstant(Instant.ofEpochMilli(millis),
TimeZone.getTimeZone("UTC").toZoneId())
+ .atZone(TimeZone.getTimeZone(timeZone).toZoneId());
+ expectedTimestamp = new Timestamp(sourceTZDateTime.toEpochSecond() *
1000);
Review Comment:
This looks to truncate millis as well.
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]