std::chrono::locate_zone(3)
π std::chrono::locate_zone π
okay so bestie, this page lives in the C++ Standard Libary manual (yes, spelled exactly like that on the tin), and the page is literally std::chrono::locate_zone. Itβs giving very βname equals nameβ energy and honestly? Iconic. π
π NAME π
std::chrono::locate_zone β std::chrono::locate_zone. Thatβs the whole name entry, no cap. π
πΈ Synopsis πΈ
Defined in header <chrono>, and itβs (since C++20) β hereβs the signature, verbatim:
Defined in header <chrono>
const std::chrono::time_zone* locate_zone( std::string_view tz_name
(since C++20)
);
Itβs a convenience function for locating a time zone in the time zone database, and itβs equivalent to exactly this:
std::chrono::get_tzdb().locate_zone(tz_name)
π¦ Exceptions π¦
Itβs std::runtime_error if:
- the specified time zone cannot be found, or
- this is the first reference to the time zone database and the time zone database cannot be initialized.
β¨ Notes β¨
A call to this function that is the first reference to the time zone database will cause it to be initialized. Thatβs the whole note, bestie β it initializes the database on first reference. π«Ά
π See also π
locate_zoneβ locate a time zone with the given name (public member function ofstd::chrono::tzdb)get_tzdbget_tzdb_listβ accesses and controls the global time zone database informationreload_tzdbβ (function)remote_versionβ (C++20)
mwah π tysm for reading, bestie! This page comes from http://cppreference.com, dated 2024.06.10, and itβs the std::chrono::locate_zone(3) page. π«Άπβ¨
π¦ where this page comes from
- nixpkgs unstable: stdman 2024.07.05
- opensuse-leap 16.0: stdman 2024.07.05-bp160.1.9 Β· MIT
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms