diff --git a/d0355r4.html b/d0355r4.html
index 9058325..8022994 100644
--- a/d0355r4.html
+++ b/d0355r4.html
@@ -37,7 +37,7 @@
Document number: D0355R4
Howard E. Hinnant
-2017-07-07
+2017-07-17
<chrono>
to Calendars and Time Zoneslist<tzdb>
instead of a single tzdb
.string_view
.
-The tzdb
database is a singleton. And access to it is
-read-only, except for reload_tzdb()
which re-initializes it.
-Each vector
is sorted to enable fast lookup. You can iterate over
-and inspect this database.
+The list<tzdb>
database is a singleton. Access is
+granted to it via the get_tzdb_list()
function which
+returns a reference to it. However this access is only needed for
+those applications which need to have long uptimes and have a need to
+update the time zone database while running. Other applications can
+implicitly access the front()
of this list via the
+read-only namespace scope functions get_tzdb()
,
+locate_zone()
and current_zone()
. Each
+vector
in tzdb
is sorted to enable fast
+lookup. You can iterate over and inspect this database. And even
+hold multiple versions of the database at once, via the
+list<tzdb>
.
-const tzdb& get_tzdb(); +const time_zone* tzdb::locate_zone(string_view tz_name) const;
- --Effects: If this is the first access to the database, will initialize -the database. -
--Returns: A
-const
reference to the database. --Thread Safety: It is safe to call this function from multiple threads at -one time. -
--Throws:
-runtime_error
if for any reason a reference can not -be returned to a validtzdb
. -
-const time_zone* locate_zone(string_view tz_name); --
-+ +-Effects: Calls
-get_tzdb()
which will initialize the timezone -database if this is the first reference to the database. -Returns: If a
time_zone
is found for whichname() == tz_name
, returns a pointer to thattime_zone
. Otherwise if alink
is found wheretz_name == link.name()
, @@ -9131,11 +9121,66 @@ then a pointer is returned to thetime_zone
for which alternative name for atime_zone
. — end note]-Throws: Any exception propagated from
+get_tzdb()
. If a -const time_zone*
can not be found as described in the -Returns clause, throws aruntime_error
. [Note: -On non-exceptional return, the return value is always a pointer to a -validtime_zone
. — end note] +Throws: If aconst time_zone*
can not 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* tzdb::current_zone() const; ++
++ ++Returns: A
+const time_zone*
referring to the time zone which your +computer has set as its local time zone. +
+list<tzdb>& get_tzdb_list(); ++
++ ++Effects: If this is the first access to the database, will +initialize the database. If this call initializes the database, the +resulting database will be a
+list<tzdb>
with +size() == 1
. ++Returns: A reference to the database. +
++Thread Safety: It is safe to call this function from multiple threads at +one time. +
++Throws:
+runtime_error
if for any reason a +reference can not be returned to a valid +list<tzdb>&
containing one or more valid +tzdb
. +
+const tzdb& get_tzdb(); ++
++ ++Returns:
+get_tzdb_list().front()
. +
+const time_zone* locate_zone(string_view tz_name); ++
+@@ -9144,23 +9189,13 @@ const time_zone* current_zone();+Returns:
get_tzdb().locate_zone(tz_name)
which +will initialize the timezone database if this is the first reference +to the database.
--Effects: Calls
-locate_zone()
which will initialize the timezone -database if this is the first reference to the database. --Returns: A
-const time_zone*
referring to the time zone which your -computer has set as its local time zone. --Throws: Any exception propagated from
+locate_zone()
. -[Note: On non-exceptional return, the return value is always a -pointer to a validtime_zone
. — end note] +Returns:get_tzdb().current_zone()
.
@@ -9177,19 +9212,17 @@ const tzdb& reload_tzdb();
IANA website. If the
IANA website is unavailable, or if the
latest version is already installed, there are no effects. Otherwise, a new version
-is available. It is downloaded and installed, and then the program re-initializes
-the tzdb
singleton from the new disk files.
+is available. It is downloaded and installed, and then the program initializes
+a new tzdb
from the new disk files and pushes it to the front of
+the list<tzdb>&
accessed by get_tzdb_list()
.
-Returns: A const
reference to the database.
+Returns: get_tzdb_list().front()
.
Thread Safety: This function is not thread safe. You must
provide your own synchronization among threads accessing the time zone database
-to safely use this function. If this function re-initializes the database, all outstanding
-const time_zone*
are invalidated (including those held within
-zoned_time
objects). And afterwards, all outstanding
-sys_info
may hold obsolete data.
+to safely use this function.
Throws: runtime_error
if for any reason a reference can not