Namespaces
Variants
Views
Actions

std::chrono::current_zone

From cppreference.com
< cpp‎ | chrono
 
 
 
Date and time utilities
(C++11)
(C++11)
Clocks
(C++20)
                                             
(C++20)
(C++20)
(C++20)
(C++20)
(C++20)
Calendars
(C++20)
(C++20)
(C++20)
(C++20)
(C++20)
Time zones
(C++20)
(C++20)
(C++20)
current_zone
(C++20)
(C++20)
(C++20)
(C++20)
C-style date and time
 
Defined in header <chrono>
const std::chrono::time_zone* current_zone();
(since C++20)

Convenience function for obtaining local time zone from the time zone database. Equivalent to std::chrono::get_tzdb().current_zone().

[edit] Exceptions

std::runtime_error 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

return the local time zone
(public member function of std::chrono::tzdb) [edit]
accesses and controls the global time zone database information
(function) [edit]