std::chrono::local_info

From cppreference.com
< cpp‎ | chrono
 
 
Utilities library
General utilities
Date and time
Function objects
Formatting library (C++20)
(C++11)
Relational operators (deprecated in C++20)
Integer comparison functions
(C++20)(C++20)(C++20)   
(C++20)
Swap and type operations
(C++14)
(C++11)
(C++11)
(C++11)
(C++17)
Common vocabulary types
(C++11)
(C++17)
(C++17)
(C++17)
(C++11)
(C++17)
(C++23)
Elementary string conversions
(C++17)
(C++17)
 
Date and time utilities
Time point
(C++11)
(C++20)
Duration
(C++11)
Clocks
(C++11)      
(C++20)
(C++20)
(C++20)
(C++20)
(C++20)
(C++20)
Time of day
(C++20)(C++20)
(C++20)(C++20)
(C++20)

Calendars
(C++20)
(C++20)
(C++20)
(C++20)
(C++20)
(C++20)
(C++20)(C++20)
Time zones
(C++20)
(C++20)
(C++20)
local_info
(C++20)
(C++20)
(C++20)
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, first is filled out with the correct std::chrono::sys_info, and second is zero-initialized.
  • If the local_time is nonexistent, then result == local_info::nonexistent, first is filled out with the std::chrono::sys_info that ends just prior to the local_time, and second is filled out with the std::chrono::sys_info that begins just after the local_time.
  • If the local_time is ambiguous, then result == local_info::ambiguous, first is filled out with the std::chrono::sys_info that ends just after the local_time, and second is filled with the std::chrono::sys_info that starts just before the local_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

outputs a local_info into a stream
(function template)

Helper classes

formatting support for local_info
(class template specialization)