1#include <boost/date_time/c_local_time_adjustor.hpp>
2#include <boost/date_time/local_time_adjustor.hpp>
3#include <boost/date_time/posix_time/posix_time.hpp>
13 std::cout <<
"\n" << std::flush;
17void log_cmd(std::string command, std::string user, std::int32_t timestamp,
18 const std::string log_type) {
19 typedef boost::date_time::c_local_adjustor<boost::posix_time::ptime>
22 std::string time = boost::posix_time::to_simple_string(
23 local_adj::utc_to_local(boost::posix_time::from_time_t(timestamp)));
25 std::cout << log_type <<
" (" << command <<
") "
26 <<
"sent by @" << user <<
" -- at " << time;