std::chrono::system_clock::to_time_t

From cppreference.com
< cpp‎ | chrono‎ | system clock
 
 
 
Date and time utilities
(C++11)
(C++11)
Clocks
(C++20)
                                                  
(C++20)
(C++20)
(C++20)
(C++20)
(C++20)
Calendars
(C++20)
(C++20)
(C++20)
(C++20)
(C++20)
Time zones
(C++20)
(C++20)
(C++20)
(C++20)
(C++20)
(C++20)
C-style date and time
 
 
static std::time_t to_time_t( const time_point& t ) noexcept;
(since C++11)

Converts t to a std::time_t type.

If std::time_t has lower precision, it is implementation-defined whether the value is rounded or truncated.

Parameters

t - system clock time point to convert

Return value

A std::time_t value representing t.

See also

[static]
converts std::time_t to a system clock time point
(public static member function)