diff options
| author | Meco Man <[email protected]> | 2021-02-11 02:31:53 +0800 |
|---|---|---|
| committer | Meco Man <[email protected]> | 2021-02-11 02:31:53 +0800 |
| commit | 072dbe57c6da6bafb90128720462dd16e92741cd (patch) | |
| tree | 2ad047590d3d392f2e5f5b17035631ddf816713f /components | |
| parent | 66e2a9424b6d4a46be1bb697fa5acbec46a287a8 (diff) | |
format & add clear tm_isdst
Diffstat (limited to 'components')
| -rw-r--r-- | components/libc/compilers/common/time.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/components/libc/compilers/common/time.c b/components/libc/compilers/common/time.c index dc33e0b9e5..081e27de74 100644 --- a/components/libc/compilers/common/time.c +++ b/components/libc/compilers/common/time.c @@ -88,6 +88,8 @@ struct tm *gmtime_r(const time_t *timep, struct tm *r) ; r->tm_mon = i; r->tm_mday += work - __spm[i]; + + r->tm_isdst = 0; return r; } @@ -103,8 +105,8 @@ struct tm* localtime_r(const time_t* t, struct tm* r) time_t local_tz; int utc_plus; - utc_plus = 3600 * 0; /* GTM: UTC+0 */ - local_tz = *t + utc_plus; + utc_plus = 0; /* GTM: UTC+0 */ + local_tz = *t + utc_plus * 3600; return gmtime_r(&local_tz, r); } |
