[time.zone.db.access] (original) (raw)
30 Time library [time]
30.11 Time zones [time.zone]
30.11.2 Time zone database [time.zone.db]
30.11.2.3 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_listholding a single initialized tzdb.
Synchronization: It is safe to call this function from multiple threads at one time.
Returns: A reference to the database.
Throws: runtime_error if for any reason a reference cannot be returned to a valid tzdb_listcontaining one or more valid tzdbs.
Returns: get_tzdb_list().front().
const time_zone* locate_zone(string_view tz_name);
Returns: get_tzdb().locate_zone(tz_name).
[Note 1:
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().