From 7ba81d515bc8021188be27b79457f47117c42c06 Mon Sep 17 00:00:00 2001 From: Dawid Heyman Date: Thu, 21 Mar 2024 15:58:26 +0100 Subject: [PATCH] Change timezone to CET in test --- .../java/net/snowflake/client/core/SqlInputTimestampUtil.java | 2 +- .../net/snowflake/client/core/SqlInputTimestampUtilTest.java | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/java/net/snowflake/client/core/SqlInputTimestampUtil.java b/src/main/java/net/snowflake/client/core/SqlInputTimestampUtil.java index f49e2ef69..b95c518c6 100644 --- a/src/main/java/net/snowflake/client/core/SqlInputTimestampUtil.java +++ b/src/main/java/net/snowflake/client/core/SqlInputTimestampUtil.java @@ -44,6 +44,6 @@ private static Timestamp getTimestampFromFormat( tz = sessionTimeZone; } SnowflakeDateTimeFormat formatter = SnowflakeDateTimeFormat.fromSqlFormat(rawFormat); - return formatter.parse(value, tz, 0, true).getTimestamp(); + return formatter.parse(value, tz, 0, false).getTimestamp(); } } diff --git a/src/test/java/net/snowflake/client/core/SqlInputTimestampUtilTest.java b/src/test/java/net/snowflake/client/core/SqlInputTimestampUtilTest.java index 4d9af46e1..16651d808 100644 --- a/src/test/java/net/snowflake/client/core/SqlInputTimestampUtilTest.java +++ b/src/test/java/net/snowflake/client/core/SqlInputTimestampUtilTest.java @@ -59,6 +59,6 @@ public void shouldGetTimestampForDifferentType() { private Timestamp getFromType(int type, String value, TimeZone explicitTimezone) { return SqlInputTimestampUtil.getTimestampFromType( - type, value, mockSession, TimeZone.getTimeZone("UTC"), explicitTimezone); + type, value, mockSession, TimeZone.getTimeZone("CET"), explicitTimezone); } }