]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
lib-index/test-mail-index-transaction-update.c: Cleanup timezone instances
authorDimitry Andric <dimitry@andric.com>
Wed, 14 Sep 2022 10:26:50 +0000 (12:26 +0200)
committeraki.tuomi <aki.tuomi@open-xchange.com>
Fri, 4 Nov 2022 09:18:05 +0000 (09:18 +0000)
In 1a7b1f66fe the non-standard extern timezone was partially removed,
but some instances were left. Since the test is supposed to run with
TZ=UTC, and timezone would have been zero anyway, remove them all.

src/lib-index/test-mail-index-transaction-update.c

index 632265025a14eec30ac955394450dacd2b191632..fb1b98e73728e604b1bc385cad0b52b73b902077 100644 (file)
@@ -648,13 +648,13 @@ static void test_mail_index_update_day_first_uid(void)
                i_zero(&hdr);
                for (j = 0; j < N_ELEMENTS(hdr.day_first_uid); j++)
                        hdr.day_first_uid[j] = 8-j;
-               hdr.day_stamp = tests[i].old_day_stamp + timezone;
+               hdr.day_stamp = tests[i].old_day_stamp;
                memcpy(t->post_hdr_change, &hdr, sizeof(hdr));
-               mail_index_update_day_headers(t, tests[i].now + timezone);
+               mail_index_update_day_headers(t, tests[i].now);
 
                struct mail_index_header new_hdr;
                memcpy(&new_hdr, t->post_hdr_change, sizeof(new_hdr));
-               test_assert_idx(new_hdr.day_stamp == tests[i].new_day_stamp + timezone, i);
+               test_assert_idx(new_hdr.day_stamp == tests[i].new_day_stamp, i);
                test_assert_idx(memcmp(new_hdr.day_first_uid,
                                       tests[i].new_day_first_uid,
                                       sizeof(uint32_t) * 8) == 0, i);