名稱空間
變體
操作

std::chrono::file_clock::to_utc, std::chrono::file_clock::from_utc

來自 cppreference.com
< cpp‎ | chrono‎ | file clock
 
 
日期和時間庫
 
 
template< class Duration >

static std::chrono::utc_time</* 見下文 */>

    to_utc( const std::chrono::file_time<Duration>& t );
(1) (C++20 起)
(可選*)
template< class Duration >

static std::chrono::file_time</* 見下文 */>

    from_utc( const std::chrono::utc_time<Duration>& t );
(2) (C++20 起)
(可選*)
1)file_time t 轉換為表示同一時間點的 utc_time
2)utc_time t 轉換為表示同一時間點的 file_time

返回型別的時長以未指定的方式從 Duration 計算得出。

這些函式模板是可選的:實現可以選擇轉而提供 to_sys()from_sys()

目錄

[編輯] 返回值

1) 一個表示與引數相同時間點的 utc_time
2) 一個表示與引數相同時間點的 file_time

[編輯] 注意

使用者程式碼通常應使用 std::chrono::clock_cast,它提供了一個通用介面來在時鐘之間轉換時間點,而不是直接呼叫這些函式。

[編輯] 示例

[編輯] 參閱

[static] (可選)
file_timesys_time 之間轉換
(公共靜態成員函式) [編輯]
將一個時鐘的時間點轉換為另一個時鐘的時間點
(函式模板) [編輯]