Files
2025-10-25 03:02:53 +03:00

2.3 KiB

[time.zone.db.access]

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();

1

#

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.

2

#

Synchronization: It is safe to call this function from multiple threads at one time.

3

#

Returns: A reference to the database.

4

#

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();

5

#

Returns: get_tzdb_list().front().

🔗

const time_zone* locate_zone(string_view tz_name);

6

#

Returns: get_tzdb().locate_zone(tz_name).

7

#

[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();

8

#

Returns: get_tzdb().current_zone().