Converting millisecond UTC to Human Readable Date_Time
I'm struggling to figure out how to preform a conversion with boost::date_time. I want to convert a millisecond value measured from the Unix epoch (00:00, Jan 1, 1970) to a human readable string - something like: 2/13/2012 15:20:11 would be ideal. I've tried some std C++ / boost suggestions I've seen but not had any luck just yet. Here is the code I use: long long ticksFromEpoch = 1329117220501; std::time_t tt = static_cast<time_t>(ticksFromEpoch); boost::posix_time::ptime dt = boost::posix_time::from_time_t(tt); // Create a time_zone_ptr for the desired time zone and use it to create a local