lundi 29 juin 2020

Boost, get UTC time in minutes precision

I want the UTC time in minutes and I don't want seconds. I am doing...

auto timeUTC = boost::posix_time::second_clock::universal_time();
std::cout << to_iso_extended_string(timeUTC) << std::endl;

This will print the time as 2020-06-29T23:06:30

I want the seconds part to be removed form the ptime object, example 2020-06-29T23:06:00. How do I do this...?

Thanks in advance...

Aucun commentaire:

Enregistrer un commentaire