From 0d7367dbf88b0241e68166b57fc4dff0f0102c80 Mon Sep 17 00:00:00 2001 From: Howard Hinnant Date: Sat, 30 Sep 2017 14:49:38 -0400 Subject: [PATCH] Rename TZ_DB to tzdb * Bring into alignment with proposal --- tz.html | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/tz.html b/tz.html index 931424a..b0b69bb 100644 --- a/tz.html +++ b/tz.html @@ -26,7 +26,7 @@

Howard E. Hinnant
-2017-09-16
+2017-09-30

Time Zone Database Parser

@@ -1017,7 +1017,7 @@ functions access it.

-struct TZ_DB
+struct tzdb
 {
     std::string            version;
     std::vector<time_zone> zones;
@@ -1028,7 +1028,7 @@ struct TZ_DB
 

-The TZ_DB database is a singleton. And access to it is +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 don't have to explicitly program binary search lookups on it. That is handled by the API. But you can @@ -1039,7 +1039,7 @@ be of benefit to your inspection logic.

All information in the IANA time zone database is -represented in the above TZ_DB data structure, except for the +represented in the above tzdb data structure, except for the comments in the database. Thus it is up to you, the client of this library, to decide what to do with this data. This library makes it especially easy and convenient to extract the data in the way that is most commonly used (e.g. time @@ -1069,7 +1069,7 @@ information, which includes macOS and iOS.

-const TZ_DB& get_tzdb();
+const tzdb& get_tzdb();
 

@@ -1099,7 +1099,7 @@ your compiler implements threadsafe function-local statics as specified by C++11

Throws: std::runtime_error if for any reason a reference can not -be returned to a valid TZ_DB. +be returned to a valid tzdb.

@@ -1146,7 +1146,7 @@ pointer to a valid time_zone. — end note]
-const TZ_DB& reload_tzdb();
+const tzdb& reload_tzdb();
 

@@ -1160,13 +1160,13 @@ If If tz.cpp was compiled with the configuration macro 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 TZ_DB singleton from the new disk files. +the tzdb singleton from the new disk files.

If tz.cpp was compiled with the configuration macro AUTO_DOWNLOAD == 0, this function re-initializes the -TZ_DB singleton from the disk files. You can manually replace the +tzdb singleton from the disk files. You can manually replace the database without ill-effects after your program has called get_tzdb() and before it calls reload_tzdb(), as there is no access to the files on disk between the first call to get_tzdb() and @@ -1187,7 +1187,7 @@ it always does when AUTO_DOWNLOAD == 0), all outstanding

Throws: std::runtime_error if for any reason a reference can not -be returned to a valid TZ_DB. +be returned to a valid tzdb.

@@ -1256,13 +1256,13 @@ called by your code:

-const TZ_DB& reload_tzdb();
+const tzdb& reload_tzdb();
 bool remote_download(const std::string& version);
 bool remote_install(const std::string& version);
 

-Once your program has initialized the TZ_DB singleton, that singleton +Once your program has initialized the tzdb singleton, that singleton can never be changed without explicit use of reload_tzdb(). — end note]