File tree 1 file changed +3
-0
lines changed
jdbc-v2/src/main/java/com/clickhouse/jdbc
1 file changed +3
-0
lines changed Original file line number Diff line number Diff line change 32
32
import java .time .LocalDate ;
33
33
import java .time .LocalDateTime ;
34
34
import java .time .LocalTime ;
35
+ import java .time .OffsetDateTime ;
35
36
import java .time .ZoneId ;
36
37
import java .time .ZonedDateTime ;
37
38
import java .time .format .DateTimeFormatter ;
@@ -472,6 +473,8 @@ private static String encodeObject(Object x) throws SQLException {
472
473
return "'" + DATETIME_FORMATTER .format (((Timestamp ) x ).toLocalDateTime ()) + "'" ;
473
474
} else if (x instanceof LocalDateTime ) {
474
475
return "'" + DATETIME_FORMATTER .format ((LocalDateTime ) x ) + "'" ;
476
+ } else if (x instanceof OffsetDateTime ) {
477
+ return encodeObject (((OffsetDateTime ) x ).toInstant ());
475
478
} else if (x instanceof ZonedDateTime ) {
476
479
return encodeObject (((ZonedDateTime ) x ).toInstant ());
477
480
} else if (x instanceof Instant ) {
You can’t perform that action at this time.
0 commit comments