Mercurial > hg > monetdb-java
changeset 162:fa42a669eddc
make checking whether data type has timezone more strict (only when it is timetz or timestamptz).
author | Martin van Dinther <martin.van.dinther@monetdbsolutions.com> |
---|---|
date | Thu, 07 Sep 2017 16:26:17 +0200 (2017-09-07) |
parents | 6fd18d4cfa41 |
children | e398c27acf7e |
files | src/main/java/nl/cwi/monetdb/jdbc/MonetPreparedStatement.java |
diffstat | 1 files changed, 4 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- 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