Skip to content

Commit ee4bb34

Browse files
committed
Use timegm in DaysSince too
1 parent a0231f2 commit ee4bb34

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

cpp/src/gandiva/tests/date_time_test.cc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -105,9 +105,9 @@ int32_t DaysSince(time_t base_line, int32_t yy, int32_t mm, int32_t dd, int32_t
105105
given_ts.tm_min = min;
106106
given_ts.tm_sec = sec;
107107

108-
time_t ts = mktime(&given_ts);
108+
time_t ts = timegm(&given_ts);
109109
if (ts == static_cast<time_t>(-1)) {
110-
ARROW_LOG(FATAL) << "mktime() failed";
110+
ARROW_LOG(FATAL) << "timegm() failed";
111111
}
112112
// time_t is an arithmetic type on both POSIX and Windows, we can simply
113113
// subtract to get a duration in seconds.

0 commit comments

Comments
 (0)