From 753b48647ff2951ab1694e578fe75faf61d23b5a Mon Sep 17 00:00:00 2001
From: Oliver Schmidt
Date: Thu, 2 Aug 2018 15:45:57 +0200
Subject: [PATCH] Increased consistency.
The test program works as-is only if the timezone isn't set (to something different than UTC). However, using localtime() instead of gmtime() makes it at least consistent in that the original time (given to mktime()) is identical to the time retrieved.
---
test/val/time.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/test/val/time.c b/test/val/time.c
index 11b0dcf91..e1c33495a 100644
--- a/test/val/time.c
+++ b/test/val/time.c
@@ -21,7 +21,7 @@ int main(void)
failures += !(rawtime == 1608805850);
- p_timeinfo = gmtime(&rawtime);
+ p_timeinfo = localtime(&rawtime);
failures += !(p_timeinfo->tm_year == timeinfo.tm_year);
failures += !(p_timeinfo->tm_mon == timeinfo.tm_mon);
--
2.39.5