From Jason Turner

[time.zone.db.tzdb]

Diff to HTML by rtfpessoa

Files changed (1) hide show
  1. tmp/tmpmak5cvlj/{from.md → to.md} +46 -0
tmp/tmpmak5cvlj/{from.md → to.md} RENAMED
@@ -0,0 +1,46 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ #### Class `tzdb` <a id="time.zone.db.tzdb">[[time.zone.db.tzdb]]</a>
2
+
3
+ ``` cpp
4
+ namespace std::chrono {
5
+ struct tzdb {
6
+ string version;
7
+ vector<time_zone> zones;
8
+ vector<time_zone_link> links;
9
+ vector<leap_second> leap_seconds;
10
+
11
+ const time_zone* locate_zone(string_view tz_name) const;
12
+ const time_zone* current_zone() const;
13
+ };
14
+ }
15
+ ```
16
+
17
+ Each `vector` in a `tzdb` object is sorted to enable fast lookup.
18
+
19
+ ``` cpp
20
+ const time_zone* locate_zone(string_view tz_name) const;
21
+ ```
22
+
23
+ *Returns:*
24
+
25
+ - If `zones` contains an element `tz` for which `tz.name() == tz_name`,
26
+ a pointer to `tz`;
27
+ - otherwise, if `links` contains an element `tz_l` for which
28
+ `tz_l.name() == tz_name`, then a pointer to the element `tz` of
29
+ `zones` for which `tz.name() == tz_l.target()`.
30
+
31
+ [*Note 1*: A `time_zone_link` specifies an alternative name for a
32
+ `time_zone`. — *end note*]
33
+
34
+ *Throws:* If a `const time_zone*` cannot be found as described in the
35
+ *Returns:* clause, throws a `runtime_error`.
36
+
37
+ [*Note 2*: On non-exceptional return, the return value is always a
38
+ pointer to a valid `time_zone`. — *end note*]
39
+
40
+ ``` cpp
41
+ const time_zone* current_zone() const;
42
+ ```
43
+
44
+ *Returns:* A pointer to the time zone which the computer has set as its
45
+ local time zone.
46
+