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 0bdc33e973616977b2dd38311508118e00623e6f..9d394b8b038917d637ab43826d57e4d79b1746c7 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 185c0306f5259206c96072b7f306f18a7a8a8f7e..8c3d5620011f0f26637712aba58285b696a5a5e6 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());