From: Vsevolod Stakhov Date: Tue, 13 Mar 2018 18:07:26 +0000 (+0000) Subject: [CritFix] Timezone defines seconds WEST UTC not East X-Git-Tag: 1.7.1~51 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=21fa2b4bb6060474d3cf3317e39763a8d9e700d9;p=thirdparty%2Frspamd.git [CritFix] Timezone defines seconds WEST UTC not East Issue: #2074 --- diff --git a/src/libutil/util.c b/src/libutil/util.c index d025730ac4..b6057f08d9 100644 --- a/src/libutil/util.c +++ b/src/libutil/util.c @@ -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 }