命名空间
变体
操作

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 );
(since 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
(公共静态成员函数) [编辑]
转换一个时钟的时间点到另一个时钟
(函数模板) [编辑]