From: Oliver Schmidt
Date: Thu, 2 Aug 2018 13:45:57 +0000 (+0200)
Subject: Increased consistency.
X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=753b48647ff2951ab1694e578fe75faf61d23b5a;p=cc65
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.
---
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);