From 83ba94b6edeb3e44cf72a528dfa9a5a2f999607c Mon Sep 17 00:00:00 2001 From: zyyang Date: Fri, 5 Mar 2021 10:18:57 +0800 Subject: [PATCH] change --- .../src/main/java/com/taosdata/jdbc/rs/RestfulResultSet.java | 2 +- .../src/test/java/com/taosdata/jdbc/rs/RestfulJDBCTest.java | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/connector/jdbc/src/main/java/com/taosdata/jdbc/rs/RestfulResultSet.java b/src/connector/jdbc/src/main/java/com/taosdata/jdbc/rs/RestfulResultSet.java index 0bdc33e973..9d394b8b03 100644 --- a/src/connector/jdbc/src/main/java/com/taosdata/jdbc/rs/RestfulResultSet.java +++ b/src/connector/jdbc/src/main/java/com/taosdata/jdbc/rs/RestfulResultSet.java @@ -98,7 +98,7 @@ public class RestfulResultSet extends AbstractResultSet implements ResultSet { case Types.DOUBLE: return row.getDouble(colIndex); case Types.TIMESTAMP: - return row.getTimestamp(colIndex); + return new Timestamp(row.getDate(colIndex).getTime()); case Types.BINARY: case Types.NCHAR: default: diff --git a/src/connector/jdbc/src/test/java/com/taosdata/jdbc/rs/RestfulJDBCTest.java b/src/connector/jdbc/src/test/java/com/taosdata/jdbc/rs/RestfulJDBCTest.java index 185c0306f5..8c3d562001 100644 --- a/src/connector/jdbc/src/test/java/com/taosdata/jdbc/rs/RestfulJDBCTest.java +++ b/src/connector/jdbc/src/test/java/com/taosdata/jdbc/rs/RestfulJDBCTest.java @@ -9,8 +9,8 @@ import java.util.Random; @FixMethodOrder(MethodSorters.NAME_ASCENDING) public class RestfulJDBCTest { - private static final String host = "127.0.0.1"; - // private static final String host = "master"; +// private static final String host = "127.0.0.1"; + private static final String host = "master"; private static Connection connection; private Random random = new Random(System.currentTimeMillis()); -- GitLab