命名空间
变体
操作

std::chrono::utc_clock::to_sys

来自 cppreference.cn
< 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

[编辑] 返回值

一个 sys_time,表示与 t 相同的时间点,如果 t 表示闰秒插入期间的时间点,则返回在插入闰秒之前的最后一个可表示值。

[编辑] 参阅

[静态]
sys_time 转换为 utc_time
(public static member function) [编辑]
将一个时钟的时间点转换为另一个时钟的时间点
(function template) [编辑]