std::chrono::gps_clock::to_utc
时间点 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
时长 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
时钟 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
当天时刻 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
日历 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
时区 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
chrono
I/O
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
(C++20)
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
C 风格日期和时间 |
成员函数 | ||||
gps_clock::to_utc
|
||||
时间点 I/O | ||||
template
<class
Duration>
static
std::chrono::utc_time<std::common_type_t<Duration,
std::chrono::seconds>> |
(C++20 起) | |
转换 gps_time
t
为表示同一时间点的 utc_time
。
返回值
与 t
表示相同时间点的 std::chrono::utc_time
,如同从 t.time_since_epoch() 构造返回类型的值并加上
315964809s
一般计算。( 315964809 是时钟 gps_clock
的纪元 1980-01-06 00:00:00 UTC
和时钟 utc_clock
的纪元 1970-01-01 00:00:00 UTC 间的秒数。)
参阅
[静态]
|
转换 utc_time 为 gps_time (公开静态成员函数) |
(C++20)
|
转换一个时钟的时间点为另一个 (函数模板) |