fork download
  1. #include <iostream>
  2. #include <ctime>
  3.  
  4. int main() {
  5.  
  6. std::time_t t = std::time(nullptr);
  7. std::tm* now = std::localtime(&t);
  8.  
  9. std::cout << now->tm_hour << ":"
  10. << now->tm_min << ":"
  11. << now->tm_sec << std::endl;
  12. return 0;
  13. }
Success #stdin #stdout 0s 4180KB
stdin
Standard input is empty
stdout
23:6:25