[flang-commits] [flang] [flang] Update the date_and_time intrinsic for AIX (PR #104849)

via flang-commits flang-commits at lists.llvm.org
Mon Aug 26 09:45:16 PDT 2024


================
@@ -263,8 +316,13 @@ GetGmtOffset(const TM &tm, fallback_implementation) {
   // tm.tm_gmtoff is not available, there may be platform dependent alternatives
   // (such as using timezone from <time.h> when available), but so far just
   // return -HUGE to report that this information is not available.
-  return -std::numeric_limits<Fortran::runtime::CppTypeFor<
-      Fortran::common::TypeCategory::Integer, KIND>>::max();
+  bool err{false};
+  auto diff{computeUTCDiff(tm, &err)};
+  if (err)
----------------
jeanPerier wrote:

Same here. The runtime style also tends to prefer

```
if (cdt) {
  return ...;
} else {
  return ...;
}
```

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


More information about the flang-commits mailing list