Namespaces
Variants
Views
Actions

std::chrono::locate_zone

From cppreference.com
< cpp‎ | chrono
 
 
Utilities library
General utilities
Relational operators (deprecated in C++20)
 
 
Defined in header <chrono>
const std::chrono::time_zone* locate_zone( std::string_view tz_name );
(since C++20)

Convenience function for locating a time zone in the time zone database. Equivalent to std::chrono::get_tzdb().locate_zone(tz_name).

[edit] Exceptions

std::runtime_error if the specified time zone cannot be found, or if this is the first reference to the time zone database and the time zone database cannot be initialized.

[edit] Notes

A call to this function that is the first reference to the time zone database will cause it to be initialized.

[edit] See also

locate a time zone with the given name
(public member function of std::chrono::tzdb) [edit]
accesses and controls the global time zone database information
(function) [edit]