添加初始化

This commit is contained in:
aozhiwei 2019-01-09 16:24:33 +08:00
parent 0c3e904eec
commit ad672a4052

View File

@ -188,7 +188,7 @@ namespace a8
time_t GetDateTimeSeconds(const char* datetime_str)
{
int g_time_zone = 8;
struct tm stm;
struct tm stm = {0};
strptime(datetime_str, "%Y-%m-%d %H:%M:%S", &stm);
long t = mktime(&stm);
return t + g_time_zone*3600;