comparison tests/Test_PStimezone.java @ 391:f523727db392

Moved Java classes from packages starting with nl.cwi.monetdb.* to package org.monetdb.* This naming complies to the Java Package Naming convention as MonetDB's main website is www.monetdb.org.
author Martin van Dinther <martin.van.dinther@monetdbsolutions.com>
date Thu, 12 Nov 2020 22:02:01 +0100 (2020-11-12)
parents 54137aeb1f92
children bf9f6b6ecf40
comparison
equal deleted inserted replaced
390:6199e0be3c6e 391:f523727db392
16 // setting, by overriding the VM's default 16 // setting, by overriding the VM's default
17 // we have to make sure that one doesn't have daylight 17 // we have to make sure that one doesn't have daylight
18 // savings corrections 18 // savings corrections
19 TimeZone.setDefault(TimeZone.getTimeZone("UTC")); 19 TimeZone.setDefault(TimeZone.getTimeZone("UTC"));
20 20
21 // Class.forName("nl.cwi.monetdb.jdbc.MonetDriver"); // not needed anymore for self registering JDBC drivers
22 Connection con = DriverManager.getConnection(args[0]); 21 Connection con = DriverManager.getConnection(args[0]);
23 Statement stmt = con.createStatement(); 22 Statement stmt = con.createStatement();
24 PreparedStatement pstmt; 23 PreparedStatement pstmt;
25 ResultSet rs = null; 24 ResultSet rs = null;
26 //DatabaseMetaData dbmd = con.getMetaData();
27 25
28 con.setAutoCommit(false); 26 con.setAutoCommit(false);
29 // >> false: auto commit was just switched off 27 // >> false: auto commit was just switched off
30 System.out.println("0. false\t" + con.getAutoCommit()); 28 System.out.println("0. false\t" + con.getAutoCommit());
31 29
32 try { 30 try {
33 stmt.executeUpdate("CREATE TABLE table_Test_PStimezone (ts timestamp, tsz timestamp with time zone, t time, tz time with time zone)"); 31 stmt.executeUpdate("CREATE TABLE table_Test_PStimezone (ts timestamp, tsz timestamp with time zone, t time, tz time with time zone)");
32 stmt.close();
34 } catch (SQLException e) { 33 } catch (SQLException e) {
35 System.out.println(e); 34 System.out.println(e);
36 System.out.println("Creation of test table failed! :("); 35 System.out.println("Creation of test table failed! :(");
37 System.out.println("ABORTING TEST!!!"); 36 System.out.println("ABORTING TEST!!!");
38 System.exit(-1); 37 System.exit(-1);