命名空间
变体
操作

std::chrono::tai_clock::to_utc

来自 cppreference.cn
< cpp‎ | chrono‎ | tai clock
 
 
 
 
template< class Duration >

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

    to_utc( const std::chrono::tai_time<Duration>& t ) noexcept;
(since C++20)

将 tai_time t 转换为表示同一时间点的 utc_time。

[编辑] 返回值

一个 std::chrono::utc_time,表示与 t 相同的时刻,计算方式如同从 t.time_since_epoch() 构造返回值类型的值,并减去 378691210 秒(378691210 是两个时钟的纪元之间相差的秒数:1958-01-01 00:00:00 TAI 和 1970-01-01 00:00:00 UTC)。

[编辑] 参见

[静态]
将 utc_time 转换为 tai_time
(公共静态成员函数) [编辑]
将一个时钟的时间点转换为另一个时钟的时间点
(函数模板) [编辑]