From b6a02974a340c6ced800fed294027daafbc1c1ca Mon Sep 17 00:00:00 2001 From: Acretock Date: Fri, 3 Dec 2021 15:32:52 +0500 Subject: [PATCH] check for win desktop app --- include/fmt/chrono.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/include/fmt/chrono.h b/include/fmt/chrono.h index d54c8ae7..a651ae81 100644 --- a/include/fmt/chrono.h +++ b/include/fmt/chrono.h @@ -878,7 +878,7 @@ template struct has_member_data_tm_gmtoff> : std::true_type {}; -#if defined(_WIN32) +#if defined(_WIN32) && (!defined(WINAPI_FAMILY) || (WINAPI_FAMILY == WINAPI_FAMILY_DESKTOP_APP)) inline void tzset_once() { static bool init = []() -> bool { _tzset(); @@ -1020,7 +1020,7 @@ template class tm_writer { write_utc_offset(tm_.tm_gmtoff); } void format_utc_offset_impl(std::false_type) { -#if defined(_WIN32) +#if defined(_WIN32) && (!defined(WINAPI_FAMILY) || (WINAPI_FAMILY == WINAPI_FAMILY_DESKTOP_APP)) tzset_once(); long offset = 0; _get_timezone(&offset);