Namespaces
Variants
Views
Actions

std::chrono::leap_second_info

From cppreference.com
< cpp‎ | chrono‎ | utc clock
 
 
Utilities library
Language support
Type support (basic types, RTTI)
Library feature-test macros (C++20)
Dynamic memory management
Program utilities
Coroutine support (C++20)
Variadic functions
Debugging support
(C++26)
Three-way comparison
(C++20)
(C++20)(C++20)(C++20)
(C++20)(C++20)(C++20)
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++20)
(C++20)
(C++20)
(C++20)
Time of day
(C++20)(C++20)
(C++20)(C++20)
(C++20)

Calendar
(C++20)
(C++20)
(C++20)
(C++20)
(C++20)
(C++20)
(C++20)(C++20)
Time zone
(C++20)
(C++20)
(C++20)(C++20)(C++20)(C++20)  
(C++20)
(C++20)
leap_second_info
(C++20)

chrono I/O
(C++20)
C-style date and time
 
 
Defined in header <chrono>
struct leap_second_info {

    bool is_leap_second;
    std::chrono::seconds elapsed;

};
(since C++20)

A leap_second_info indicates whether a UTC time is during a positive leap second insertion and the total number of leap seconds between 1 January 1970 and the UTC time.

leap_second_info has no base classes or members other than is_leap_second, elapsed, and implicitly declared special member functions.

[edit] Member objects

is_leap_second
whether the UTC time is during a positive leap second insertion
(public member object)
elapsed
the sum of leap seconds between 1 January 1970 and the UTC time
(public member object)

[edit] Notes

leap_second_info is typically obtained from std::chrono::get_leap_second_info.

[edit] See also

contains information about a leap second insertion
(class) [edit]