diff --git a/src/test/java/net/snowflake/client/core/SqlInputTimestampUtilTest.java b/src/test/java/net/snowflake/client/core/SqlInputTimestampUtilTest.java index fc240f3bb..08a102b86 100644 --- a/src/test/java/net/snowflake/client/core/SqlInputTimestampUtilTest.java +++ b/src/test/java/net/snowflake/client/core/SqlInputTimestampUtilTest.java @@ -17,9 +17,8 @@ public class SqlInputTimestampUtilTest { private static final SFLogger LOGGER = SFLoggerFactory.getLogger(SqlInputTimestampUtilTest.class); - - private static final String TIMESTAMP_IN_FORMAT_1 = "2021-12-22 09:43:44.000"; - private static final String TIMESTAMP_IN_FORMAT_2 = "Wed, 22 Dec 2021 09:43:44"; + private static final String TIMESTAMP_IN_FORMAT_1 = "2021-12-22 09:43:44.000 +0100"; + private static final String TIMESTAMP_IN_FORMAT_2 = "Wed, 22 Dec 2021 09:43:44 +0100"; private static final Map CONNECTION_PARAMS = new HashMap<>(); private static final Timestamp EXPECTED_TIMESTAMP = Timestamp.valueOf(LocalDateTime.of(2021, 12, 22, 9, 43, 44)); @@ -29,8 +28,8 @@ public class SqlInputTimestampUtilTest { @BeforeClass public static void setup() { - CONNECTION_PARAMS.put("TIMESTAMP_OUTPUT_FORMAT", "YYYY-MM-DD HH24:MI:SS.FF3"); - CONNECTION_PARAMS.put("TIMESTAMP_TZ_OUTPUT_FORMAT", "DY, DD MON YYYY HH24:MI:SS"); + CONNECTION_PARAMS.put("TIMESTAMP_OUTPUT_FORMAT", "YYYY-MM-DD HH24:MI:SS.FF3 TZHTZM"); + CONNECTION_PARAMS.put("TIMESTAMP_TZ_OUTPUT_FORMAT", "DY, DD MON YYYY HH24:MI:SS TZHTZM"); mockSession = Mockito.mock(SFBaseSession.class); Mockito.when(mockSession.getCommonParameters()).thenReturn(CONNECTION_PARAMS); } @@ -59,6 +58,6 @@ public void shouldGetTimestampForDifferentType() { private Timestamp getFromType(int type, String value, TimeZone explicitTimezone) { return SqlInputTimestampUtil.getTimestampFromType( - type, value, mockSession, TimeZone.getTimeZone("CET"), explicitTimezone); + type, value, mockSession, TimeZone.getTimeZone("GMT"), explicitTimezone); } }