修改时区计算公式的错误

This commit is contained in:
Meco Man 2021-02-08 11:37:24 +08:00
parent 2645aec2e3
commit 39ff4b5a97
1 changed files with 3 additions and 3 deletions

View File

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