26 Time library [time]

26.10 Time zones [time.zone]

26.10.2 Time zone database [time.zone.db] Time zone database access [time.zone.db.access]

tzdb_list& get_tzdb_list();
Effects: If this is the first access to the time zone database, initializes the database.
If this call initializes the database, the resulting database will be a tzdb_­list holding a single initialized tzdb.
Returns: A reference to the database.
Remarks: It is safe to call this function from multiple threads at one time.
Throws: runtime_­error if for any reason a reference cannot be returned to a valid tzdb_­list containing one or more valid tzdbs.
const tzdb& get_tzdb();
Returns: get_­tzdb_­list().front().
const time_zone* locate_zone(string_view tz_name);
Returns: get_­tzdb().locate_­zone(tz_­name).
The time zone database will be initialized if this is the first reference to the database.
end note
const time_zone* current_zone();
Returns: get_­tzdb().current_­zone().