// 2012-10-22 10:22:52.1111 bool IsTimeStr(const std::string& timestr) { static time_t invalidtime = time_t(-1); static time_t begintime = Str2Time("1970-01-01 00:00:00"); time_t curtime = Str2Time(timestr); return (curtime>=begintime && curtime<invalidtime); }
static BOOL ReadTimeFromIni( const wchar_t* lpszFile, const wchar_t* lpszApp, const wchar_t* lpszKey, SYSTEMTIME& stTime ) { wchar_t strTime[TIME_STRING_MAX_LEN]; if (ReadTimeFromIni(lpszFile, lpszApp, lpszKey, strTime)) { return Str2Time(strTime, stTime); } return FALSE; }