Skip to content

Latest commit

 

History

History
58 lines (41 loc) · 2.11 KB

local_t.md

File metadata and controls

58 lines (41 loc) · 2.11 KB
title description ms.date f1_keywords helpviewer_keywords dev_langs
local_t struct
Learn more about: local_t struct
09/02/2021
chrono/std::chrono::local_t
chrono/std::chrono::local_time"
chrono/std::chrono::local_days
chrono/std::chrono::local_seconds
std::chrono [C++], local_t
C++

local_t struct

A pseudo-clock.

Syntax

struct local_t {}; // C++20

Remarks

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.

Non-members

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.

Related typedefs

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.

Requirements

Header: <chrono> (since C++20)

Namespace: std::chrono

Compiler Option: /std:c++latest

See also

<chrono>
file_clock class
gps_clock class
high_resolution_clock
steady_clock struct
system_clock struct
tai_clock class
Header Files Reference