| 68 | } |
| 69 | |
| 70 | std::string DateTimeStrFormat(const char* pszFormat, int64_t nTime) |
| 71 | { |
| 72 | // std::locale takes ownership of the pointer |
| 73 | std::locale loc(std::locale::classic(), new boost::posix_time::time_facet(pszFormat)); |
| 74 | std::stringstream ss; |
| 75 | ss.imbue(loc); |
| 76 | ss << boost::posix_time::from_time_t(nTime); |
| 77 | return ss.str(); |
| 78 | } |
| 79 | |
| 80 | std::string DurationToDHMS(int64_t nDurationTime) |
| 81 | { |