From: Robert Kessl Date: Fri, 5 Sep 2014 08:55:11 +0000 (+0200) Subject: xtypes: fix of tests of xt_timestamp::parse X-Git-Tag: v6.2~6^2 X-Git-Url: http://mj.ucw.cz/gitweb/?a=commitdiff_plain;h=e2e7127bedd0979a383074d4c660af4816721f01;p=libucw.git xtypes: fix of tests of xt_timestamp::parse --- diff --git a/ucw/xtypes-test.c b/ucw/xtypes-test.c index a43e0fb1..a0f4acbf 100644 --- a/ucw/xtypes-test.c +++ b/ucw/xtypes-test.c @@ -13,8 +13,9 @@ #include #include -#include #include +#include +#include static void test_size_parse_correct(struct fastbuf *out) { @@ -134,9 +135,17 @@ static void test_timestamp_parse_correct(struct fastbuf *out) static u64 timestamp_parsed[] = { 1403685533, - 1403678333, + 0, }; + // fill the value of timestamp_parsed as the timestamp in the + // current time zone. + { + struct tm parsed_time; + strptime(timestamp_strs[1], "%F %T", &parsed_time); + timestamp_parsed[1] = mktime(&parsed_time); + } + struct mempool *pool = mp_new(4096); uint i = 0;