From 82b5b0d1030e6d2bc7f116519d1124069e48880d Mon Sep 17 00:00:00 2001 From: zhangchengwei Date: Tue, 20 Nov 2018 17:50:58 +0800 Subject: [PATCH] =?UTF-8?q?=E8=B0=83=E6=95=B4expires=E5=A4=B4=E9=83=A8?= =?UTF-8?q?=E8=A7=A3=E6=9E=90?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- cache/src/tango_cache_tools.cpp | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/cache/src/tango_cache_tools.cpp b/cache/src/tango_cache_tools.cpp index 0b78468..e22a8b9 100644 --- a/cache/src/tango_cache_tools.cpp +++ b/cache/src/tango_cache_tools.cpp @@ -220,7 +220,6 @@ int mkdir_according_path(const char * path) time_t expires_hdr2timestamp(const char *expires_val, int len) { struct tm tm; - time_t expire; while(len > 0 && (*expires_val==' '||*expires_val=='\t'||*expires_val=='\r'||*expires_val=='\n')) { @@ -238,8 +237,7 @@ time_t expires_hdr2timestamp(const char *expires_val, int len) return 0; } - expire = mktime(&tm); - return expire; + return mktime(&tm); } //将本地时间戳转换为GMT时间字符串