(C++) std::asctimeJanuary 10, 2018 · View on GitHub (C++) std::asctime std::asctime is an STL time function to convert std::tm to a std::string. #include <ctime> #include <iostream> int main () { std::time_t my_time; std::time( &my_time ); const std::tm * const time_and_date = std::localtime(&my_time); std::cout << std::asctime(time_and_date); }