std::string getTime(void)
time_t now;
time(&now);
// 定义两个变量,存储转换结果
struct tm tmTmp;
char stTmp[TIME_MAX];
// 转换为tm结构
localtime_s(&tmTmp, &now);
// 转换为字符串并输出
asctime_s(stTmp, &tmTmp);
std::string a;
for (int i = 11; i < 19; i++)
{
a += stTmp[i];
}
return a;
}