提交 9079cbd5 authored 作者: Evgenij Ryazanov's avatar Evgenij Ryazanov

Pass Value to valueToOffsetDateTime() for consistency

上级 72342962
...@@ -3829,8 +3829,7 @@ public class JdbcResultSet extends TraceObject implements ResultSet, JdbcResultS ...@@ -3829,8 +3829,7 @@ public class JdbcResultSet extends TraceObject implements ResultSet, JdbcResultS
return type.cast(LocalDateTimeUtils.valueToInstant(value)); return type.cast(LocalDateTimeUtils.valueToInstant(value));
} else if (LocalDateTimeUtils.isOffsetDateTime(type) && } else if (LocalDateTimeUtils.isOffsetDateTime(type) &&
value instanceof ValueTimestampTimeZone) { value instanceof ValueTimestampTimeZone) {
return type.cast(LocalDateTimeUtils.valueToOffsetDateTime( return type.cast(LocalDateTimeUtils.valueToOffsetDateTime(value));
(ValueTimestampTimeZone) value));
} else { } else {
throw unsupported(type.getName()); throw unsupported(type.getName());
} }
......
...@@ -459,8 +459,9 @@ public class LocalDateTimeUtils { ...@@ -459,8 +459,9 @@ public class LocalDateTimeUtils {
* @param value the value to convert * @param value the value to convert
* @return the OffsetDateTime * @return the OffsetDateTime
*/ */
public static Object valueToOffsetDateTime(ValueTimestampTimeZone value) { public static Object valueToOffsetDateTime(Value value) {
return timestampWithTimeZoneToOffsetDateTime((TimestampWithTimeZone) value.getObject()); ValueTimestampTimeZone valueTimestampTimeZone = (ValueTimestampTimeZone) value.convertTo(Value.TIMESTAMP_TZ);
return timestampWithTimeZoneToOffsetDateTime((TimestampWithTimeZone) valueTimestampTimeZone.getObject());
} }
private static Object timestampWithTimeZoneToOffsetDateTime( private static Object timestampWithTimeZoneToOffsetDateTime(
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论