kou commented on code in PR #13428:
URL: https://github.com/apache/arrow/pull/13428#discussion_r920622543


##########
cpp/src/gandiva/gdv_function_stubs_test.cc:
##########
@@ -993,4 +993,61 @@ TEST(TestGdvFnStubs, TestTranslate) {
   EXPECT_EQ(expected, std::string(result, out_len));
 }
 
+TEST(TestGdvFnStubs, TestToUtcTimezone) {
+  gandiva::ExecutionContext context;
+  auto context_ptr = reinterpret_cast<int64_t>(&context);
+  gdv_int32 len_ist = static_cast<gdv_int32>(strlen("Asia/Kolkata"));
+  gdv_int32 len_pst = static_cast<gdv_int32>(strlen("America/Los_Angeles"));
+
+  //2012-02-28 15:30:00 Asia/Kolkata
+  gdv_timestamp ts = 55800000;
+  gdv_timestamp ts2 = to_utc_timezone_timestamp(context_ptr, ts,
+                                                "Asia/Kolkata", len_ist);
+  EXPECT_EQ(36000000, ts2);
+
+  //1970-01-01 5:00:00 Asia/Kolkata
+  ts = 18000000;

Review Comment:
   I see.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to