tmp/tmpqz7mtnj8/{from.md → to.md}
RENAMED
|
@@ -0,0 +1,63 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
#### Class `sys_info` <a id="time.zone.info.sys">[[time.zone.info.sys]]</a>
|
| 2 |
+
|
| 3 |
+
``` cpp
|
| 4 |
+
namespace std::chrono {
|
| 5 |
+
struct sys_info {
|
| 6 |
+
sys_seconds begin;
|
| 7 |
+
sys_seconds end;
|
| 8 |
+
seconds offset;
|
| 9 |
+
minutes save;
|
| 10 |
+
string abbrev;
|
| 11 |
+
};
|
| 12 |
+
}
|
| 13 |
+
```
|
| 14 |
+
|
| 15 |
+
A `sys_info` object can be obtained from the combination of a
|
| 16 |
+
`time_zone` and either a `sys_time` or `local_time`. It can also be
|
| 17 |
+
obtained from a `zoned_time`, which is effectively a pair of a
|
| 18 |
+
`time_zone` and `sys_time`.
|
| 19 |
+
|
| 20 |
+
[*Note 1*: This type provides a low-level interface to time zone
|
| 21 |
+
information. Typical conversions from `sys_time` to `local_time` will
|
| 22 |
+
use this class implicitly, not explicitly. — *end note*]
|
| 23 |
+
|
| 24 |
+
The `begin` and `end` data members indicate that, for the associated
|
| 25 |
+
`time_zone` and `time_point`, the `offset` and `abbrev` are in effect in
|
| 26 |
+
the range \[`begin`, `end`). This information can be used to efficiently
|
| 27 |
+
iterate the transitions of a `time_zone`.
|
| 28 |
+
|
| 29 |
+
The `offset` data member indicates the UTC offset in effect for the
|
| 30 |
+
associated `time_zone` and `time_point`. The relationship between
|
| 31 |
+
`local_time` and `sys_time` is:
|
| 32 |
+
|
| 33 |
+
``` cpp
|
| 34 |
+
offset = local_time - sys_time
|
| 35 |
+
```
|
| 36 |
+
|
| 37 |
+
The `save` data member is extra information not normally needed for
|
| 38 |
+
conversion between `local_time` and `sys_time`. If `save != 0min`, this
|
| 39 |
+
`sys_info` is said to be on “daylight saving” time, and `offset - save`
|
| 40 |
+
suggests what offset this `time_zone` might use if it were off daylight
|
| 41 |
+
saving time. However, this information should not be taken as
|
| 42 |
+
authoritative. The only sure way to get such information is to query the
|
| 43 |
+
`time_zone` with a `time_point` that returns a `sys_info` where
|
| 44 |
+
`save == 0min`. There is no guarantee what `time_point` might return
|
| 45 |
+
such a `sys_info` except that it is guaranteed not to be in the range
|
| 46 |
+
\[`begin`, `end`) (if `save != 0min` for this `sys_info`).
|
| 47 |
+
|
| 48 |
+
The `abbrev` data member indicates the current abbreviation used for the
|
| 49 |
+
associated `time_zone` and `time_point`. Abbreviations are not unique
|
| 50 |
+
among the `time_zones`, and so one cannot reliably map abbreviations
|
| 51 |
+
back to a `time_zone` and UTC offset.
|
| 52 |
+
|
| 53 |
+
``` cpp
|
| 54 |
+
template<class charT, class traits>
|
| 55 |
+
basic_ostream<charT, traits>&
|
| 56 |
+
operator<<(basic_ostream<charT, traits>& os, const sys_info& r);
|
| 57 |
+
```
|
| 58 |
+
|
| 59 |
+
*Effects:* Streams out the `sys_info` object `r` in an unspecified
|
| 60 |
+
format.
|
| 61 |
+
|
| 62 |
+
*Returns:* `os`.
|
| 63 |
+
|