13 inline bool s2time(
const std::string& a_string,time_t& a_time) {
14 int yy, mm, dd, hh, mi, ss;
15 if(::sscanf(a_string.c_str(),
17 &yy,&mm,&dd,&hh,&mi,&ss)!=6) {a_time = 0;
return false;}
26 a_time = ::mktime(&tp);
30 inline bool time2s(std::string& a_s) {
32 if(::time(&d)==(time_t)-1) {a_s.clear();
return false;}
33 char* _cstr = ::ctime(&d);