title | description | ms.date | f1_keywords | helpviewer_keywords | dev_langs | ||||||
---|---|---|---|---|---|---|---|---|---|---|---|
local_t struct |
Learn more about: local_t struct |
09/02/2021 |
|
|
|
A pseudo-clock.
struct local_t {}; // C++20
Use this struct as an argument to the time_point
template to indicate that a time_point
represents local time. Specifying local_t
doesn't specify the time zone of the local time.
As an example of how local_t
is used, consider the declaration local_days ld{Sunday[1] / January / 2021};
This ultimately resolves to time_point<local_t, duration<long long>;
where local_t
indicates that the time_point represents local time.
Name | Description |
---|---|
from_stream |
Parse a local_time from the given stream using the specified format. |
operator<< |
Output a local_time to the given stream. |
Name | Description |
---|---|
local_days |
A synonym for local_time<days> . Defined in std::chrono . |
local_seconds |
A synonym for local_time<seconds> . Defined in std::chrono . |
local_time |
A synonym for template <class Duration> using local_time = time_point<local_t, Duration> . Useful for representing a time_point for a local time. You specify the Duration . Defined in std::chrono . |
Header: <chrono>
(since C++20)
Namespace: std::chrono
Compiler Option: /std:c++latest
<chrono>
file_clock class
gps_clock class
high_resolution_clock
steady_clock
struct
system_clock
struct
tai_clock
class
Header Files Reference