From e2e7127bedd0979a383074d4c660af4816721f01 Mon Sep 17 00:00:00 2001 From: Robert Kessl Date: Fri, 5 Sep 2014 10:55:11 +0200 Subject: [PATCH] xtypes: fix of tests of xt_timestamp::parse --- ucw/xtypes-test.c | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) 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; -- 2.39.2