25 Time library [time]

25.10 Time zones [time.zone]

25.10.2 Time zone database [time.zone.db]

25.10.2.1 Class tzdb [time.zone.db.tzdb]

namespace std::chrono {
  struct tzdb {
    string            version;
    vector<time_zone> zones;
    vector<link>      links;
    vector<leap>      leaps;

    const time_zone* locate_zone(string_view tz_name) const;
    const time_zone* current_zone() const;
  };
}
Each vector in a tzdb object is sorted to enable fast lookup.
const time_zone* locate_zone(string_view tz_name) const;
Returns: If a time_­zone is found for which name() == tz_­name, returns a pointer to that time_­zone.
Otherwise if a link is found for which tz_­name == link.name(), then a pointer is returned to the time_­zone for which zone.name() == link.target().
[ Note
:
A link specifies an alternative name for a time_­zone.
— end note
 ]
Throws: If a const time_­zone* cannot be found as described in the Returns: clause, throws a runtime_­error.
[ Note
:
On non-exceptional return, the return value is always a pointer to a valid time_­zone.
— end note
 ]
const time_zone* current_zone() const;
Returns: A pointer to the time zone which the computer has set as its local time zone.