std::chrono::utc_clock::to_sys

来自cppreference.com
< cpp‎ | chrono‎ | utc clock
 
 
 
 
template< class Duration >

static std::chrono::sys_time<std::common_type_t<Duration, std::chrono::seconds>>

    to_sys( const std::chrono::utc_time<Duration>& t );
(C++20 起)

转换 utc_time t 为表示同一时间点的 sys_time(若可能)。

t 表示在闰秒插入期间的时间点,则返回先于插入闰秒的最后可表示 sys_time 值。所有其他情况下, utc_clock::from_sys(utc_clock::to_sys(t)) == t

返回值

t 表示同一时间点的 sys_time,或若 t 表示在闰秒插入期间的时间点,则为先于插入闰秒的最后可表示值。

参阅

[静态]
转换 sys_timeutc_time
(公开静态成员函数)
转换一个时钟的时间点为另一个
(函数模板)