]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
lib-storage: Reverse MAIL_SEARCH_ARG_FLAG_USE_TZ handling.
authorTimo Sirainen <timo.sirainen@dovecot.fi>
Tue, 1 Nov 2016 13:51:02 +0000 (15:51 +0200)
committerTimo Sirainen <timo.sirainen@dovecot.fi>
Wed, 9 Nov 2016 12:14:13 +0000 (14:14 +0200)
It was being used the wrong way. SEARCH SENTON/BEFORE/AFTER should have
checked the times within the mail's timezone, not UTC.

src/lib-storage/index/index-search.c

index 7dfdbda73b4e7028951d034f658901911e270387..38d18e3e6fdfd8a1c5ca02d96b7a964b127e5b5e 100644 (file)
@@ -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);