std::chrono::tzdb

From cppreference.com
< cpp‎ | chrono
Date and time library
Time point
(C++11)
(C++20)
Duration
(C++11)
Clocks
(C++11)
(C++11)
(C++20)
(C++20)
(C++20)
(C++20)
(C++20)
(C++20)
Time of day
(C++20)(C++20)
(C++20)(C++20)
(C++20)

Calendar
(C++20)
(C++20)
(C++20)
(C++20)
(C++20)
(C++20)
(C++20)
(C++20)
(C++20)
(C++20)(C++20)
Time zone
tzdb
(C++20)
(C++20)
(C++20) (C++20) (C++20) (C++20)
(C++20)
(C++20)
(C++20)
(C++20)
(C++20)
(C++20)
chrono I/O
(C++20)
C-style date and time
std::chrono::tzdb
Defined in header <chrono>
struct tzdb;
(since C++20)

The class tzdb represents a copy of the IANA time zone database. Users cannot construct a tzdb and can only obtain read-only access to one via the free functions std::chrono::get_tzdb_list and std::chrono::get_tzdb

Member objects

Member object Description
version A std::string that contains the version of the database
zones A sorted std::vector < std::chrono::time_zone >
links A sorted std::vector < std::chrono::time_zone_link >
leap_seconds A sorted std::vector < std::chrono::leap_second >

Member functions

locate a time zone with the given name
(public member function)
return the local time zone
(public member function)