std::chrono::utc_clock::to_sys
来自 cppreference.cn
template< class Duration > static std::chrono::sys_time<std::common_type_t<Duration, std::chrono::seconds>> |
(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 (公共静态成员函数) |
(C++20) |
转换一个时钟的时间点到另一个时钟 (函数模板) |