diff --git a/src/test/java/com/snowflake/snowpark_test/JavaFunctionSuite.java b/src/test/java/com/snowflake/snowpark_test/JavaFunctionSuite.java index 2350e363..0d2d2b30 100644 --- a/src/test/java/com/snowflake/snowpark_test/JavaFunctionSuite.java +++ b/src/test/java/com/snowflake/snowpark_test/JavaFunctionSuite.java @@ -3055,16 +3055,14 @@ public void collect_set() { @Test public void from_unixtime1() { DataFrame df = getSession().sql("select * from values(20231010), (20220515) as t(a)"); - Row[] expected = { - Row.create("1970-08-22 20:43:30.000 -0700"), Row.create("1970-08-22 17:48:35.000 -0700") - }; + Row[] expected = {Row.create("1970-08-23 03:43:30.000"), Row.create("1970-08-23 00:48:35.000")}; checkAnswer(df.select(Functions.from_unixtime(df.col("a"))), expected, false); } @Test public void from_unixtime2() { DataFrame df = getSession().sql("select * from values(20231010), (456700809) as t(a)"); - Row[] expected = {Row.create("1970/08/22"), Row.create("1984/06/21")}; + Row[] expected = {Row.create("1970/08/23"), Row.create("1984/06/21")}; checkAnswer(df.select(Functions.from_unixtime(df.col("a"), "YYYY/MM/DD")), expected, false); } diff --git a/src/test/scala/com/snowflake/snowpark_test/FunctionSuite.scala b/src/test/scala/com/snowflake/snowpark_test/FunctionSuite.scala index e07601c9..65ea003f 100644 --- a/src/test/scala/com/snowflake/snowpark_test/FunctionSuite.scala +++ b/src/test/scala/com/snowflake/snowpark_test/FunctionSuite.scala @@ -2406,13 +2406,13 @@ trait FunctionSuite extends TestData { val input = Seq("20231010", "20220515").toDF("date") checkAnswer( input.select(from_unixtime(col("date")).as("formatted_date")), - Seq(Row("1970-08-22 20:43:30.000 -0700"), Row("1970-08-22 17:48:35.000 -0700")), + Seq(Row("1970-08-23 03:43:30.000"), Row("1970-08-23 00:48:35.000")), sort = false) } test("from_unixtime_2") { val input = Seq("20231010", "456700809").toDF("date") - val expected = Seq("1970/08/22", "1984/06/21").toDF("formatted_date") + val expected = Seq("1970/08/23", "1984/06/21").toDF("formatted_date") checkAnswer( input.select(from_unixtime(col("date"), "YYYY/MM/DD").as("formatted_date")),