| 1018 | } |
| 1019 | |
| 1020 | string DateTimeStrFormat(const char* pszFormat, int64_t nTime) { |
| 1021 | // locale takes ownership of the pointer |
| 1022 | locale loc(locale::classic(), new boost::posix_time::time_facet(pszFormat)); |
| 1023 | stringstream ss; |
| 1024 | ss.imbue(loc); |
| 1025 | ss << boost::posix_time::from_time_t(nTime); |
| 1026 | return ss.str(); |
| 1027 | } |
| 1028 | |
| 1029 | |
| 1030 | static bool ParsePrechecks(const std::string& str) |