From Jason Turner

[time.zone.info]

Diff to HTML by rtfpessoa

Files changed (1) hide show
  1. tmp/tmpgkt2u96i/{from.md → to.md} +112 -0
tmp/tmpgkt2u96i/{from.md → to.md} RENAMED
@@ -0,0 +1,112 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ### Information classes <a id="time.zone.info">[[time.zone.info]]</a>
2
+
3
+ #### Class `sys_info` <a id="time.zone.info.sys">[[time.zone.info.sys]]</a>
4
+
5
+ ``` cpp
6
+ namespace std::chrono {
7
+ struct sys_info {
8
+ sys_seconds begin;
9
+ sys_seconds end;
10
+ seconds offset;
11
+ minutes save;
12
+ string abbrev;
13
+ };
14
+ }
15
+ ```
16
+
17
+ A `sys_info` object can be obtained from the combination of a
18
+ `time_zone` and either a `sys_time` or `local_time`. It can also be
19
+ obtained from a `zoned_time`, which is effectively a pair of a
20
+ `time_zone` and `sys_time`.
21
+
22
+ [*Note 1*: This type provides a low-level interface to time zone
23
+ information. Typical conversions from `sys_time` to `local_time` will
24
+ use this class implicitly, not explicitly. — *end note*]
25
+
26
+ The `begin` and `end` data members indicate that, for the associated
27
+ `time_zone` and `time_point`, the `offset` and `abbrev` are in effect in
28
+ the range \[`begin`, `end`). This information can be used to efficiently
29
+ iterate the transitions of a `time_zone`.
30
+
31
+ The `offset` data member indicates the UTC offset in effect for the
32
+ associated `time_zone` and `time_point`. The relationship between
33
+ `local_time` and `sys_time` is:
34
+
35
+ ``` cpp
36
+ offset = local_time - sys_time
37
+ ```
38
+
39
+ The `save` data member is extra information not normally needed for
40
+ conversion between `local_time` and `sys_time`. If `save != 0min`, this
41
+ `sys_info` is said to be on “daylight saving” time, and `offset - save`
42
+ suggests what offset this `time_zone` might use if it were off daylight
43
+ saving time. However, this information should not be taken as
44
+ authoritative. The only sure way to get such information is to query the
45
+ `time_zone` with a `time_point` that returns a `sys_info` where
46
+ `save == 0min`. There is no guarantee what `time_point` might return
47
+ such a `sys_info` except that it is guaranteed not to be in the range
48
+ \[`begin`, `end`) (if `save != 0min` for this `sys_info`).
49
+
50
+ The `abbrev` data member indicates the current abbreviation used for the
51
+ associated `time_zone` and `time_point`. Abbreviations are not unique
52
+ among the `time_zones`, and so one cannot reliably map abbreviations
53
+ back to a `time_zone` and UTC offset.
54
+
55
+ ``` cpp
56
+ template<class charT, class traits>
57
+ basic_ostream<charT, traits>&
58
+ operator<<(basic_ostream<charT, traits>& os, const sys_info& r);
59
+ ```
60
+
61
+ *Effects:* Streams out the `sys_info` object `r` in an unspecified
62
+ format.
63
+
64
+ *Returns:* `os`.
65
+
66
+ #### Class `local_info` <a id="time.zone.info.local">[[time.zone.info.local]]</a>
67
+
68
+ ``` cpp
69
+ namespace std::chrono {
70
+ struct local_info {
71
+ static constexpr int unique = 0;
72
+ static constexpr int nonexistent = 1;
73
+ static constexpr int ambiguous = 2;
74
+
75
+ int result;
76
+ sys_info first;
77
+ sys_info second;
78
+ };
79
+ }
80
+ ```
81
+
82
+ [*Note 1*: This type provides a low-level interface to time zone
83
+ information. Typical conversions from `local_time` to `sys_time` will
84
+ use this class implicitly, not explicitly. — *end note*]
85
+
86
+ Describes the result of converting a `local_time` to a `sys_time` as
87
+ follows:
88
+
89
+ - When a `local_time` to `sys_time` conversion is unique,
90
+ `result == unique`, `first` will be filled out with the correct
91
+ `sys_info`, and `second` will be zero-initialized.
92
+ - If the conversion stems from a nonexistent `local_time` then
93
+ `result == nonexistent`, `first` will be filled out with the
94
+ `sys_info` that ends just prior to the `local_time`, and `second` will
95
+ be filled out with the `sys_info` that begins just after the
96
+ `local_time`.
97
+ - If the conversion stems from an ambiguous `local_time`, then
98
+ `result == ambiguous`, `first` will be filled out with the `sys_info`
99
+ that ends just after the `local_time`, and `second` will be filled out
100
+ with the `sys_info` that starts just before the `local_time`.
101
+
102
+ ``` cpp
103
+ template<class charT, class traits>
104
+ basic_ostream<charT, traits>&
105
+ operator<<(basic_ostream<charT, traits>& os, const local_info& r);
106
+ ```
107
+
108
+ *Effects:* Streams out the `local_info` object `r` in an unspecified
109
+ format.
110
+
111
+ *Returns:* `os`.
112
+