[time.zone.db.list]

# 30 Time library [[time]](./#time)

## 30.11 Time zones [[time.zone]](time.zone#db.list)

### 30.11.2 Time zone database [[time.zone.db]](time.zone.db#list)

#### 30.11.2.2 Class tzdb_list [time.zone.db.list]

namespace std::chrono {class tzdb_list {public: tzdb_list(const tzdb_list&) = delete;
 tzdb_list& operator=(const tzdb_list&) = delete; // unspecified additional constructorsclass const_iterator; const tzdb& front() const noexcept;

 const_iterator erase_after(const_iterator p);

 const_iterator begin() const noexcept;
 const_iterator end() const noexcept;

 const_iterator cbegin() const noexcept;
 const_iterator cend() const noexcept; };}

[1](#1)

[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/time.tex#L8829)

The tzdb_list database is a singleton;
the unique object of type tzdb_list can be
accessed via the get_tzdb_list() function[.](#1.sentence-1)

[*Note [1](#note-1)*:

This access is only needed for those applications
that need to have long uptimes and
have a need to update the time zone database while running[.](#1.sentence-2)

Other applications can implicitly access the front() of this list
via the read-only namespace scope functionsget_tzdb(),locate_zone(), andcurrent_zone()[.](#1.sentence-3)

â *end note*]

The tzdb_list object contains a list of tzdb objects[.](#1.sentence-4)

[2](#2)

[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/time.tex#L8845)

tzdb_list​::​const_iterator is a constant iterator
which meets the [*Cpp17ForwardIterator*](forward.iterators#:Cpp17ForwardIterator "24.3.5.5 Forward iterators [forward.iterators]") requirements
and has a value type of tzdb[.](#2.sentence-1)

[ð](#lib:front,tzdb_list)

`const tzdb& front() const noexcept;
`

[3](#3)

[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/time.tex#L8856)

*Synchronization*: This operation is thread-safe with respect to reload_tzdb()[.](#3.sentence-1)

[*Note [2](#note-2)*:

reload_tzdb() pushes a new tzdb onto the front of this container[.](#3.sentence-2)

â *end note*]

[4](#4)

[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/time.tex#L8864)

*Returns*: A reference to the first tzdb in the container[.](#4.sentence-1)

[ð](#lib:erase_after,tzdb_list)

`const_iterator erase_after(const_iterator p);
`

[5](#5)

[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/time.tex#L8875)

*Preconditions*: The iterator following p is dereferenceable[.](#5.sentence-1)

[6](#6)

[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/time.tex#L8879)

*Effects*: Erases the tzdb referred to by the iterator following p[.](#6.sentence-1)

[7](#7)

[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/time.tex#L8883)

*Postconditions*: No pointers, references, or iterators are invalidated
except those referring to the erased tzdb[.](#7.sentence-1)

[*Note [3](#note-3)*:

It is not possible to erase the tzdb referred to by begin()[.](#7.sentence-2)

â *end note*]

[8](#8)

[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/time.tex#L8892)

*Returns*: An iterator pointing to the element following the one that was erased,
or end() if no such element exists[.](#8.sentence-1)

[9](#9)

[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/time.tex#L8897)

*Throws*: Nothing[.](#9.sentence-1)

[ð](#lib:begin,tzdb_list)

`const_iterator begin() const noexcept;
`

[10](#10)

[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/time.tex#L8908)

*Returns*: An iterator referring to the first tzdb in the container[.](#10.sentence-1)

[ð](#lib:end,tzdb_list)

`const_iterator end() const noexcept;
`

[11](#11)

[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/time.tex#L8919)

*Returns*: An iterator referring to the position one past the last tzdb in the container[.](#11.sentence-1)

[ð](#lib:cbegin,tzdb_list)

`const_iterator cbegin() const noexcept;
`

[12](#12)

[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/time.tex#L8930)

*Returns*: begin()[.](#12.sentence-1)

[ð](#lib:cend,tzdb_list)

`const_iterator cend() const noexcept;
`

[13](#13)

[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/time.tex#L8941)

*Returns*: end()[.](#13.sentence-1)
