fork download
  1. #include <iostream>
  2. #include <chrono>
  3. #include <ctime>
  4.  
  5.  
  6. int main(){
  7. auto time_point = std::chrono::system_clock::now();
  8. std::time_t ttp = std::chrono::system_clock::to_time_t(time_point);
  9. std::cout << "time: " << std::ctime(&ttp);
  10.  
  11. return 0;
  12. }
  13.  
Success #stdin #stdout 0s 3272KB
stdin
Standard input is empty
stdout
time: Mon Feb  2 18:08:04 2015