修复GetDateTimeSeconds问题

This commit is contained in:
aozhiwei 2018-12-11 20:24:17 +08:00
parent ab8a6b21f1
commit 58c82113e3

View File

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