[libc-commits] [libc] change the return value type of mktime_internal to time_t (PR #132231)

Mikhail R. Gadelha via libc-commits libc-commits at lists.llvm.org
Mon Mar 24 06:22:20 PDT 2025


================
@@ -27,20 +27,20 @@ int64_t mktime_internal(const tm *tm_out) {
   if (sizeof(time_t) == 4 &&
       tm_year_from_base >= time_constants::END_OF32_BIT_EPOCH_YEAR) {
     if (tm_year_from_base > time_constants::END_OF32_BIT_EPOCH_YEAR)
-      return time_utils::out_of_range();
+      return cpp::nullopt;
     if (tm_out->tm_mon > 0)
-      return time_utils::out_of_range();
+      return cpp::nullopt;
     if (tm_out->tm_mday > 19)
-      return time_utils::out_of_range();
+      return cpp::nullopt;
     else if (tm_out->tm_mday == 19) {
-      if (tm_out->tm_hour > 3)
-        return time_utils::out_of_range();
+      if (tm_out->tm_hour > 3) 
----------------
mikhailramalho wrote:

whitespace?

https://github.com/llvm/llvm-project/pull/132231


More information about the libc-commits mailing list