Skip to content

Commit 9feae7d

Browse files
author
git apple-llvm automerger
committed
Merge commit '9fb792496687' from llvm.org/main into next
2 parents be6c738 + 9fb7924 commit 9feae7d

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

libc/src/time/time_utils.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -102,10 +102,10 @@ cpp::optional<time_t> mktime_internal(const tm *tm_out) {
102102

103103
// TODO: https://github.com/llvm/llvm-project/issues/121962
104104
// Need to handle timezone and update of tm_isdst.
105-
time_t seconds = tm_out->tm_sec +
106-
tm_out->tm_min * time_constants::SECONDS_PER_MIN +
107-
tm_out->tm_hour * time_constants::SECONDS_PER_HOUR +
108-
total_days * time_constants::SECONDS_PER_DAY;
105+
time_t seconds = static_cast<time_t>(
106+
tm_out->tm_sec + tm_out->tm_min * time_constants::SECONDS_PER_MIN +
107+
tm_out->tm_hour * time_constants::SECONDS_PER_HOUR +
108+
total_days * time_constants::SECONDS_PER_DAY);
109109
return seconds;
110110
}
111111

0 commit comments

Comments
 (0)