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); }