Namespaces
Variants

std::chrono::gps_clock:: to_utc

From cppreference.net
template < class Duration >

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

to_utc ( const std:: chrono :: gps_time < Duration > & t ) noexcept ;
(C++20以降)
翻訳のポイント: - HTMLタグ、属性、コード部分は完全に保持 - `(since C++20)` を `(C++20以降)` に翻訳 - C++のキーワード(template, class, static, const, noexceptなど)は翻訳せず保持 - 関数名 `to_utc` は翻訳せず保持 - 標準ライブラリの型名(std::chrono::utc_time, std::common_type_t, std::chrono::gps_timeなど)は翻訳せず保持

gps_time t を同じ時点を表す utc_time に変換します。

戻り値

t と同じ時点を表す std::chrono::utc_time 。戻り値の型の値を t. time_since_epoch ( ) から構築し、 315964809s を加算することで計算される(315964809は2つのクロックのエポック間の秒数: gps_clock では1980-01-06 00:00:00 UTC、 utc_clock では1970-01-01 00:00:00 UTC)。

関連項目

[static]
utc_time gps_time に変換する
(public static member function)
(C++20)
あるクロックの時間点を別のクロックに変換する
(function template)