Fix time maybe?

This commit is contained in:
Andrew Pamment 2017-04-21 20:45:47 +10:00
parent 61494afc32
commit db4431c22d

View File

@ -24,7 +24,11 @@ time_t utc_to_local(time_t utc) {
localtime_r(&utc, &date_time); localtime_r(&utc, &date_time);
local = mktime(&date_time); local = utc + date_time.tm_gmtoff;
if (date_time.tm_isdst) {
local += 3600;
}
return local; return local;
} }