Documentation Home >> Headers >> <chrono> Header >> std::chrono::system_clock >> std::chrono::system_clock::to_time_t Static Member Function

Convert an instance of time_point to time_t.

time_t to_time_t(time_point const& t) noexcept;

Returns:

A time_t value that represents the same point in time as t truncated to seconds precision.

Throws:

An exception of type std::system_error if an error occurs.

Header

#include <chrono>

See Also