名稱空間
變體
操作

std::chrono::tzdb::locate_zone

來自 cppreference.com
< cpp‎ | chrono‎ | tzdb
 
 
 
std::chrono::tzdb
成員函式
tzdb::locate_zone
 
const std::chrono::time_zone* locate_zone( std::string_view tz_name ) const;
(C++20 起)

獲取指向此資料庫中 tz_name 指定時區的 std::chrono::time_zone 指標。如果 p 是返回的指標,則 p->name() == tz_name,或者此資料庫中存在一個 std::chrono::time_zone_link l,使得 p->name() == l.target() && l.name() == tz_name

目錄

[編輯] 引數

tz_name - 一個時區名稱

[編輯] 返回值

指向此資料庫中 tz_name 指定時區的 std::chrono::time_zone 的指標。

[編輯] 異常

如果找不到這樣的 time_zone,則丟擲 std::runtime_error

[編輯] 示例