The extern timezone variable is not standardized. This commit introduces
a more portable way of determining the UTC-offset by using the local
time.
#include "test-common.h"
#include "mail-index-private.h"
#include "mail-index-transaction-private.h"
+#include "utc-offset.h"
#include <time.h>
/* daylight savings times were confusing these tests, so we'll now
just assume that TZ=UTC */
- test_assert(timezone == 0);
+ time_t now = time(NULL);
+ struct tm *local_time = localtime(&now);
+ test_assert(utc_offset(local_time, now) == 0);
hdr.messages_count = 10;
t = mail_index_transaction_new();