From 39ff4b5a97accf4a0c2134b8b7b395482fc785fb Mon Sep 17 00:00:00 2001 From: Meco Man <920369182@qq.com> Date: Mon, 8 Feb 2021 11:37:24 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E6=97=B6=E5=8C=BA=E8=AE=A1?= =?UTF-8?q?=E7=AE=97=E5=85=AC=E5=BC=8F=E7=9A=84=E9=94=99=E8=AF=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- components/libc/compilers/common/time.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/components/libc/compilers/common/time.c b/components/libc/compilers/common/time.c index 7e4a98f923..2cea9b75ce 100644 --- a/components/libc/compilers/common/time.c +++ b/components/libc/compilers/common/time.c @@ -101,10 +101,10 @@ struct tm* gmtime(const time_t* t) struct tm* localtime_r(const time_t* t, struct tm* r) { time_t local_tz; - int timezone; + int utc; - timezone = 0 * 3600 * 8; /* GTM: UTC+0 */ - local_tz = *t + timezone; + utc = 3600 * 0; /* GTM: UTC+0 */ + local_tz = *t + utc; return gmtime_r(&local_tz, r); } -- GitLab