Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix test_set_time and test_time_tz's timezone error #33

Merged
merged 1 commit into from
Jun 12, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
build
.idea
cmake-build-debug
cmake-build-debug
2 changes: 2 additions & 0 deletions src/test/java/org/duckdb/TestDuckDBJDBC.java
Original file line number Diff line number Diff line change
Expand Up @@ -1148,6 +1148,7 @@ public static void test_set_date() throws Exception {
}

public static void test_set_time() throws Exception {
TimeZone.setDefault(TimeZone.getTimeZone("UTC"));
try (Connection conn = DriverManager.getConnection(JDBC_URL);
PreparedStatement stmt = conn.prepareStatement("SELECT ?::VARCHAR")) {
Time time = Time.valueOf("12:40:00");
Expand Down Expand Up @@ -1906,6 +1907,7 @@ public static void test_schema_reflection() throws Exception {

public static void test_time_tz() throws Exception {
try (Connection conn = DriverManager.getConnection(JDBC_URL); Statement s = conn.createStatement()) {
s.execute("set timezone = 'UTC'");
s.executeUpdate("create table t (i time with time zone)");
try (ResultSet rs = conn.getMetaData().getColumns(null, "%", "t", "i");) {
rs.next();
Expand Down
Loading