Author: abauer
Date: 2005-04-09 00:37:55 +0200 (Sat, 09 Apr 2005)
New Revision: 465
Modified:
trunk/formats/vformats-xml/vformat.c
trunk/tests/check_vcal.c
Log:
Fixed the problem when running the unit tests in a different timezone
Modified: trunk/formats/vformats-xml/vformat.c
===================================================================
--- trunk/formats/vformats-xml/vformat.c 2005-04-08 21:33:17 UTC (rev 464)
+++ trunk/formats/vformats-xml/vformat.c 2005-04-08 22:37:55 UTC (rev 465)
@@ -73,7 +73,7 @@
btime.tm_min = time[2] * 10 + time[3] - '0' * 11;
btime.tm_sec = time[4] * 10 + time[5] - '0' * 11;
}
-
+
time_t utime = mktime(&btime);
return utime;
}
Modified: trunk/tests/check_vcal.c
===================================================================
--- trunk/tests/check_vcal.c 2005-04-08 21:33:17 UTC (rev 464)
+++ trunk/tests/check_vcal.c 2005-04-08 22:37:55 UTC (rev 465)
@@ -1,4 +1,5 @@
#include "support.h"
+#include <time.h>
static void conv_vcal(const char *filename)
{
@@ -353,19 +354,22 @@
START_TEST (todo_get_revision1)
{
- fail_unless(vcal_get_revision("data/vtodos/evolution2/todo-full1.vcf") == 1110067010, NULL);
+ struct tm testtm = {50, 56, 0, 6, 3 - 1, 2005 - 1900, 0, 0, 0};
+ fail_unless(vcal_get_revision("data/vtodos/evolution2/todo-full1.vcf") == mktime(&testtm), NULL);
}
END_TEST
START_TEST (todo_get_revision2)
{
- fail_unless(vcal_get_revision("data/vtodos/evolution2/todo-full2.vcf") == 1110067010, NULL);
+ struct tm testtm = {50, 56, 0, 6, 3 - 1, 2005 - 1900, 0, 0, 0};
+ fail_unless(vcal_get_revision("data/vtodos/evolution2/todo-full2.vcf") == mktime(&testtm), NULL);
}
END_TEST
START_TEST (todo_get_revision3)
{
- fail_unless(vcal_get_revision("data/vtodos/evolution2/todo-full3.vcf") == 1110063600, NULL);
+ struct tm testtm = {0, 0, 0, 6, 3 - 1, 2005 - 1900, 0, 0, 0};
+ fail_unless(vcal_get_revision("data/vtodos/evolution2/todo-full3.vcf") == mktime(&testtm), NULL);
}
END_TEST
|