std::chrono::tai_clock:: to_utc
|
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Member functions | ||||
|
tai_clock::to_utc
|
||||
| Time point I/O | ||||
|
template
<
class
Duration
>
static
std::
chrono
::
utc_time
<
std::
common_type_t
<
Duration,
std::
chrono
::
seconds
>>
|
(C++20 起) | |
将
tai_time
t
转换为表示同一时间点的
utc_time
。
返回值
一个表示与 t 相同时间点的 std::chrono::utc_time ,其计算方式为:通过从 t. time_since_epoch ( ) 构造返回类型的值,并减去 378691210s (378691210 是两个时钟纪元之间的秒数差:TAI 时钟的 1958-01-01 00:00:00 与 UTC 时钟的 1970-01-01 00:00:00)。
参见
|
[static]
|
将
utc_time
转换为
tai_time
(公开静态成员函数) |
|
(C++20)
|
将一个时钟的时间点转换为另一个时钟的时间点
(函数模板) |