Bonjour,
J'ai lu ce très bon tuto qui explique comment utiliser boost, et notamment la partie sur les timers asynchrones.
J'ai cependant une exception lors de l'exécution du code donné dans l'article : could not convert calendar time to UTC time
J'ai aussi essayé ça :
boost::asio::deadline_timer t(io, boost::posix_time::seconds(boost::TIME_UTC + 5));
mais ça ne marche pas non plus.
J'ai lu ceci sur le net (y'a pas beaucoup de sites qui en parlent) :
After some time traking the culprit, I got to the function
time_type microsec_clock::create_time(time_converter converter) from the boost\date_time\microsec_time_clock.hpp header
in which the variable 'std::time_t t' was strangely assuming a negative value, probably due to an overflow.
Then I realized that changing the type of the variable 'micros' from uint64_t to std::time_t on that same function, could solve the problem.
Mais s'il y avait une autre solution que d'aller bidouiller dans les fichiers de Boost ça m'arrangerais 
Avez-vous déjà eu ce problème ?
Partager