You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

23 lines
543 B

  1. #pragma once
  2. #include <signal.h>
  3. #include <chrono>
  4. #include <fstream>
  5. #include <functional>
  6. #include <iostream>
  7. #include <list>
  8. #include <map>
  9. #include <memory>
  10. #include <set>
  11. #include <sstream>
  12. #include <string>
  13. #include <vector>
  14. using namespace std;
  15. using namespace chrono;
  16. int main(int argc, char *argv[]) {
  17. std::time_t now = std::chrono::system_clock::to_time_t(std::chrono::system_clock::now());
  18. std::string s(30, '\0');
  19. std::strftime(&s[0], s.size(), "%Y-%m-%d %H:%M:%S", std::localtime(&now));
  20. cout << s << endl;
  21. return 0;
  22. }