Код: Выделить всё
auto tp = std::chrono::system_clock::now();
static auto const tz = std::chrono::current_zone();
static auto info = tz->get_info(tp); // CACHE THE TIMEZONE INFO
if (tp >= info.end) // APPARENTLY THE TIME ZONE INFO CAN CHANGE UP TO TWICE A YEAR
info = tz->get_info(tp);
auto tpl = std::chrono::local_days{} + (tp + info.offset - std::chrono::sys_days{});
auto tpd = floor(tpl);
std::chrono::year_month_day ymd{ tpd };
std::chrono::hh_mm_ss hms{ tpl - tpd };
Подробнее здесь: https://stackoverflow.com/questions/784 ... ulated-the