I'm trying to print an ISO timestamp with second accuracy.
#include <chrono> #include <ctime> time_t current_time = current_time_point().sec_since_epoch() * 1000; char* charTime = std::put_time( std::localtime(¤t_time), "%FT%T%z" ); print(charTime);
I've tried several combinations. I keep getting complaints about the namespace:
error: no member named 'localtime' in namespace 'std'
What is the correct way of doing this using cdt 1.6.1?