]> source.dussan.org Git - rspamd.git/commitdiff
[CritFix] Timezone defines seconds WEST UTC not East
authorVsevolod Stakhov <vsevolod@highsecure.ru>
Tue, 13 Mar 2018 18:07:26 +0000 (18:07 +0000)
committerVsevolod Stakhov <vsevolod@highsecure.ru>
Tue, 13 Mar 2018 18:07:26 +0000 (18:07 +0000)
Issue: #2074

src/libutil/util.c

index d025730ac4c302c99392e2f744f5a721bba84373..b6057f08d9e38541d46125aed92d5f79b9a5f2ba 100644 (file)
@@ -2785,11 +2785,11 @@ void rspamd_localtime (gint64 ts, struct tm *dest)
                last_tzcheck = ts;
        }
 
-       ts += timezone;
+       ts -= timezone;
        rspamd_gmtime (ts, dest);
        dest->tm_zone = daylight ? (tzname[1] ? tzname[1] : tzname[0]) : tzname[0];
 #if !defined(__sun)
-       dest->tm_gmtoff = timezone;
+       dest->tm_gmtoff = -timezone;
 #endif
 }