tmp/tmp0s7re45f/{from.md → to.md}
RENAMED
|
@@ -0,0 +1,63 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
#### Member functions <a id="time.zone.members">[[time.zone.members]]</a>
|
| 2 |
+
|
| 3 |
+
``` cpp
|
| 4 |
+
string_view name() const noexcept;
|
| 5 |
+
```
|
| 6 |
+
|
| 7 |
+
*Returns:* The name of the `time_zone`.
|
| 8 |
+
|
| 9 |
+
[*Example 1*: `"America/New_York"`. — *end example*]
|
| 10 |
+
|
| 11 |
+
``` cpp
|
| 12 |
+
template<class Duration>
|
| 13 |
+
sys_info get_info(const sys_time<Duration>& st) const;
|
| 14 |
+
```
|
| 15 |
+
|
| 16 |
+
*Returns:* A `sys_info` `i` for which `st` is in the range \[`i.begin`,
|
| 17 |
+
`i.end`).
|
| 18 |
+
|
| 19 |
+
``` cpp
|
| 20 |
+
template<class Duration>
|
| 21 |
+
local_info get_info(const local_time<Duration>& tp) const;
|
| 22 |
+
```
|
| 23 |
+
|
| 24 |
+
*Returns:* A `local_info` for `tp`.
|
| 25 |
+
|
| 26 |
+
``` cpp
|
| 27 |
+
template<class Duration>
|
| 28 |
+
sys_time<common_type_t<Duration, seconds>>
|
| 29 |
+
to_sys(const local_time<Duration>& tp) const;
|
| 30 |
+
```
|
| 31 |
+
|
| 32 |
+
*Returns:* A `sys_time` that is at least as fine as `seconds`, and will
|
| 33 |
+
be finer if the argument `tp` has finer precision. This `sys_time` is
|
| 34 |
+
the UTC equivalent of `tp` according to the rules of this `time_zone`.
|
| 35 |
+
|
| 36 |
+
*Throws:* If the conversion from `tp` to a `sys_time` is ambiguous,
|
| 37 |
+
throws `ambiguous_local_time`. If the `tp` represents a non-existent
|
| 38 |
+
time between two UTC `time_points`, throws `nonexistent_local_time`.
|
| 39 |
+
|
| 40 |
+
``` cpp
|
| 41 |
+
template<class Duration>
|
| 42 |
+
sys_time<common_type_t<Duration, seconds>>
|
| 43 |
+
to_sys(const local_time<Duration>& tp, choose z) const;
|
| 44 |
+
```
|
| 45 |
+
|
| 46 |
+
*Returns:* A `sys_time` that is at least as fine as `seconds`, and will
|
| 47 |
+
be finer if the argument `tp` has finer precision. This `sys_time` is
|
| 48 |
+
the UTC equivalent of `tp` according to the rules of this `time_zone`.
|
| 49 |
+
If the conversion from `tp` to a `sys_time` is ambiguous, returns the
|
| 50 |
+
earlier `sys_time` if `z == choose::earliest`, and returns the later
|
| 51 |
+
`sys_time` if `z == choose::latest`. If the `tp` represents a
|
| 52 |
+
non-existent time between two UTC `time_points`, then the two UTC
|
| 53 |
+
`time_points` will be the same, and that UTC `time_point` will be
|
| 54 |
+
returned.
|
| 55 |
+
|
| 56 |
+
``` cpp
|
| 57 |
+
template<class Duration>
|
| 58 |
+
local_time<common_type_t<Duration, seconds>>
|
| 59 |
+
to_local(const sys_time<Duration>& tp) const;
|
| 60 |
+
```
|
| 61 |
+
|
| 62 |
+
*Returns:* The `local_time` associated with `tp` and this `time_zone`.
|
| 63 |
+
|