tmp/tmp19lqpdbj/{from.md → to.md}
RENAMED
|
@@ -0,0 +1,43 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
### Local time <a id="time.clock.local">[[time.clock.local]]</a>
|
| 2 |
+
|
| 3 |
+
The family of time points denoted by `local_time<Duration>` are based on
|
| 4 |
+
the pseudo clock `local_t`. `local_t` has no member `now()` and thus
|
| 5 |
+
does not meet the clock requirements. Nevertheless
|
| 6 |
+
`local_time<Duration>` serves the vital role of representing local time
|
| 7 |
+
with respect to a not-yet-specified time zone. Aside from being able to
|
| 8 |
+
get the current time, the complete `time_point` algebra is available for
|
| 9 |
+
`local_time<Duration>` (just as for `sys_time<Duration>`).
|
| 10 |
+
|
| 11 |
+
``` cpp
|
| 12 |
+
template<class charT, class traits, class Duration>
|
| 13 |
+
basic_ostream<charT, traits>&
|
| 14 |
+
operator<<(basic_ostream<charT, traits>& os, const local_time<Duration>& lt);
|
| 15 |
+
```
|
| 16 |
+
|
| 17 |
+
*Effects:*
|
| 18 |
+
|
| 19 |
+
``` cpp
|
| 20 |
+
os << sys_time<Duration>{lt.time_since_epoch()};
|
| 21 |
+
```
|
| 22 |
+
|
| 23 |
+
*Returns:* `os`.
|
| 24 |
+
|
| 25 |
+
``` cpp
|
| 26 |
+
template<class charT, class traits, class Duration, class Alloc = allocator<charT>>
|
| 27 |
+
basic_istream<charT, traits>&
|
| 28 |
+
from_stream(basic_istream<charT, traits>& is, const charT* fmt,
|
| 29 |
+
local_time<Duration>& tp, basic_string<charT, traits, Alloc>* abbrev = nullptr,
|
| 30 |
+
minutes* offset = nullptr);
|
| 31 |
+
```
|
| 32 |
+
|
| 33 |
+
*Effects:* Attempts to parse the input stream `is` into the `local_time`
|
| 34 |
+
`tp` using the format flags given in the NTCTS `fmt` as specified in
|
| 35 |
+
[[time.parse]]. If the parse fails to decode a valid date,
|
| 36 |
+
`is.setstate(ios_base::failbit)` is called and `tp` is not modified. If
|
| 37 |
+
`%Z` is used and successfully parsed, that value will be assigned to
|
| 38 |
+
`*abbrev` if `abbrev` is non-null. If `%z` (or a modified variant) is
|
| 39 |
+
used and successfully parsed, that value will be assigned to `*offset`
|
| 40 |
+
if `offset` is non-null.
|
| 41 |
+
|
| 42 |
+
*Returns:* `is`.
|
| 43 |
+
|