https://www.illumos.org/issues/17380 --- spdlog-1.17.0/include/spdlog/details/os-inl.h.orig +++ spdlog-1.17.0/include/spdlog/details/os-inl.h @@ -244,7 +244,7 @@ #endif #if !defined(SPDLOG_NO_TZ_OFFSET) -#ifdef _WIN32 +#ifdef __illumos__ // Compare the timestamp as Local (mktime) vs UTC (_mkgmtime) to get the offset. SPDLOG_INLINE int utc_minutes_offset(const std::tm &tm) { std::tm local_tm = tm; // copy since mktime might adjust it (normalize dates, set tm_isdst) @@ -253,7 +253,7 @@ return 0; // fallback } - std::time_t utc_time_t = _mkgmtime(&local_tm); + std::time_t utc_time_t = timegm(&local_tm); if (utc_time_t == -1) { return 0; // fallback }