From ee4bb34f91e7d0204e6a0ee36223773c7679f4ec Mon Sep 17 00:00:00 2001 From: Bryce Mecum Date: Mon, 6 Jul 2026 16:50:13 -0700 Subject: [PATCH] Use timegm in DaysSince too --- cpp/src/gandiva/tests/date_time_test.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cpp/src/gandiva/tests/date_time_test.cc b/cpp/src/gandiva/tests/date_time_test.cc index 2f1d876af869..8a59098c5c3b 100644 --- a/cpp/src/gandiva/tests/date_time_test.cc +++ b/cpp/src/gandiva/tests/date_time_test.cc @@ -105,9 +105,9 @@ int32_t DaysSince(time_t base_line, int32_t yy, int32_t mm, int32_t dd, int32_t given_ts.tm_min = min; given_ts.tm_sec = sec; - time_t ts = mktime(&given_ts); + time_t ts = timegm(&given_ts); if (ts == static_cast(-1)) { - ARROW_LOG(FATAL) << "mktime() failed"; + ARROW_LOG(FATAL) << "timegm() failed"; } // time_t is an arithmetic type on both POSIX and Windows, we can simply // subtract to get a duration in seconds.