wgtmac opened a new issue, #35138:
URL: https://github.com/apache/arrow/issues/35138
### Describe the bug, including details regarding any error messages,
version, and platform.
The piece of code below in the `class
ArrowFlightJdbcTimeStampVectorAccessor` does not deal with timezone correctly.
```java
private LocalDateTime getLocalDateTime(Calendar calendar) {
getter.get(getCurrentRow(), holder);
this.wasNull = holder.isSet == 0;
this.wasNullConsumer.setWasNull(this.wasNull);
if (this.wasNull) {
return null;
}
long value = holder.value;
LocalDateTime localDateTime = this.longToLocalDateTime.fromLong(value);
if (calendar != null) {
TimeZone timeZone = calendar.getTimeZone();
long millis = this.timeUnit.toMillis(value);
localDateTime = localDateTime
.minus(timeZone.getOffset(millis) -
this.timeZone.getOffset(millis), ChronoUnit.MILLIS);
}
return localDateTime;
}
```
It should call `localDateTime.plus` instead of `localDateTime.minus`.
I hit this issue when integrating this into our own JDBC implementation and
found that the timestamp string in the `ResultSet` is wrong when converting
between timezones.
### Component(s)
Java
--
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]