From 58c82113e3ab51acaf44fda66efd30f8e326e394 Mon Sep 17 00:00:00 2001 From: aozhiwei Date: Tue, 11 Dec 2018 20:24:17 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8DGetDateTimeSeconds=E9=97=AE?= =?UTF-8?q?=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- a8/sysutils.cc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/a8/sysutils.cc b/a8/sysutils.cc index e713c92..068fa27 100644 --- a/a8/sysutils.cc +++ b/a8/sysutils.cc @@ -187,10 +187,11 @@ namespace a8 time_t GetDateTimeSeconds(const char* datetime_str) { + int g_time_zone = 8; struct tm stm; strptime(datetime_str, "%Y-%m-%d %H:%M:%S", &stm); long t = mktime(&stm); - return t; + return t + g_time_zone*3600; } long long MakeInt64(int low32, int high32)