# HG changeset patch
# User Martin van Dinther <martin.van.dinther@monetdbsolutions.com>
# Date 1504794377 -7200
# Node ID fa42a669eddcb3b43183e432d9c184a6bcd3f7a0
# Parent  6fd18d4cfa41b9718b6ce8d1fb65b0165c2fe4d6
make checking whether data type has timezone more strict (only when it is timetz or timestamptz).

diff --git a/src/main/java/nl/cwi/monetdb/jdbc/MonetPreparedStatement.java b/src/main/java/nl/cwi/monetdb/jdbc/MonetPreparedStatement.java
--- a/src/main/java/nl/cwi/monetdb/jdbc/MonetPreparedStatement.java
+++ b/src/main/java/nl/cwi/monetdb/jdbc/MonetPreparedStatement.java
@@ -2434,7 +2434,8 @@ public class MonetPreparedStatement
 			return;
 		}
 
-		boolean hasTimeZone = monetdbType[getParamIdx(parameterIndex)].endsWith("tz");
+		String MonetDBType = monetdbType[getParamIdx(parameterIndex)];
+		boolean hasTimeZone = ("timetz".equals(MonetDBType) || "timestamptz".equals(MonetDBType));
 		if (hasTimeZone) {
 			// timezone shouldn't matter, since the server is timezone
 			// aware in this case
@@ -2504,7 +2505,8 @@ public class MonetPreparedStatement
 			return;
 		}
 
-		boolean hasTimeZone = monetdbType[getParamIdx(parameterIndex)].endsWith("tz");
+		String MonetDBType = monetdbType[getParamIdx(parameterIndex)];
+		boolean hasTimeZone = ("timestamptz".equals(MonetDBType) || "timetz".equals(MonetDBType));
 		if (hasTimeZone) {
 			// timezone shouldn't matter, since the server is timezone
 			// aware in this case