Std::put time
Current Time
auto now = std::chrono::system_clock::now();
auto now_c = std::chrono::system_clock::to_time_t(now);
std::cout << std::put_time(std::localtime(&now_c), "%c") << '\n';
Troubleshooting
put_time is not a member of std
GCC에서 컴파일 할 경우 아래와 같은 에러메시지가 출력될 수 있다.
이 현상은 GCC 4.9
에서 나타나는 현상이다. GCC 5
로 업데이트 하면 된다.