Convert ros time to hours-minutes-seconds string in system timezone in C++?
I want to convert ros time stamps out of message headers to std::string in a form like YYYY MM DD HH MM SS.SSS or similar. Optionally not including the year or month or day would be nice.
An example showing converting the stamp to a generic unix time data structure then passing that into a function that can convert from that to a string using a format string would be very useful to have (ros time to time_t to strftime would be nice), also something showing modern C++ and std::chrono.
Ideally a minimum of dependencies (like boost) or blocks of conversion code to cut and paste would be required.
The answer to #q251966 outputs UTC time uses boost and doesn't show any other control over the output format so isn't sufficient.