I would like to create filenames with timestamps in them based on when the program was run, i.e.
logfile_2020-04-21_18:11:10.txt
logfile_2020-04-22_18:13:43.txt
...
I can get the timestamp (I think) with
std::chrono::steady_clock::time_point timestamp = std::chrono::steady_clock::now();
but I don't know how to convert that into a string, much less a human-readable string.
The exact format of the timestamps doesn't matter, as long as it has the full date and time. Is there a simple way to do this in C++ using standard libraries?