std::chrono:: local_info
From cppreference.com
C++
Utilities library
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Date and time utilities
| Time point | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Duration | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Clocks | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Time of day | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Calendar | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Time zone | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
chrono
I/O
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
(C++20)
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| C-style date and time | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
std::chrono::local_info
| Non-member functions | ||||
| Helper classes | ||||
|
Defined in header
<chrono>
|
||
|
struct
local_info
;
|
(since C++20) | |
The class
local_info
describes the result of converting a
std::chrono::local_time
to a
std::chrono::sys_time
.
-
If the result of the conversion is unique, then
result
==
local_info
::
unique
,
firstis filled out with the correct std::chrono::sys_info , andsecondis zero-initialized. -
If the
local_timeis nonexistent, then result == local_info :: nonexistent ,firstis filled out with the std::chrono::sys_info that ends just prior to thelocal_time, andsecondis filled out with the std::chrono::sys_info that begins just after thelocal_time. -
If the
local_timeis ambiguous, then result == local_info :: ambiguous ,firstis filled out with the std::chrono::sys_info that ends just after thelocal_time, andsecondis filled with the std::chrono::sys_info that starts just before thelocal_time.
This is a low-level data structure; typical conversions from
local_time
to
sys_time
will use it implicitly rather than explicitly.
Member constants
| Name | Value |
|
constexpr int
unique
[static]
|
0
(public static member constant) |
|
constexpr int
nonexistent
[static]
|
1
(public static member constant) |
|
constexpr int
ambiguous
[static]
|
2
(public static member constant) |
Member objects
| Member object | Type |
result
|
int |
first
,
second
|
std::chrono::sys_info |
Nonmember functions
|
(C++20)
|
outputs a
local_info
into a stream
(function template) |
Helper classes
formatting support for
local_info
(class template specialization) |
Retrieved from "
https://en.cppreference.com/mwiki/index.php?title=cpp/chrono/local_info&oldid=161601
"