Can someone help me to format a date string using Howard Hinnant's excellent date/time library. I am trying to output a UTC date from the current time. The desired format of the date/time is zulu time per:
"2018-11-01T15:32:56Z" - i.e. "YYYY-MM-DDTHH:MM:SSZ" -
So far using Howard's documentation I was able to get the partial result to work as follows:
const auto today = floor<days>(system_clock::now());
auto dateTimeString = std::format("{}T{:02}:{:02}:{:02}Z", today, 15, 20, 59);
I had to hard code the HH MM & SS fields. I am sure there is an easy way to format a custom date/time in this library. Any help appreciated.