From: Timo Sirainen Date: Tue, 1 Nov 2016 13:51:02 +0000 (+0200) Subject: lib-storage: Reverse MAIL_SEARCH_ARG_FLAG_USE_TZ handling. X-Git-Tag: 2.2.27~245 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=b5169b98bb89eb7c9b1c00f30a43ec98cc56a7bc;p=thirdparty%2Fdovecot%2Fcore.git lib-storage: Reverse MAIL_SEARCH_ARG_FLAG_USE_TZ handling. It was being used the wrong way. SEARCH SENTON/BEFORE/AFTER should have checked the times within the mail's timezone, not UTC. --- diff --git a/src/lib-storage/index/index-search.c b/src/lib-storage/index/index-search.c index 7dfdbda73b..38d18e3e6f 100644 --- a/src/lib-storage/index/index-search.c +++ b/src/lib-storage/index/index-search.c @@ -323,7 +323,7 @@ static int search_arg_match_cached(struct index_search_context *ctx, } if ((arg->value.search_flags & - MAIL_SEARCH_ARG_FLAG_USE_TZ) == 0) { + MAIL_SEARCH_ARG_FLAG_USE_TZ) != 0) { if (!have_tz_offset) { tm = localtime(&date); tz_offset = utc_offset(tm, date);