mirror of
https://github.com/cc65/cc65.git
synced 2025-07-16 06:24:16 +00:00
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.
This commit is contained in:
@@ -21,7 +21,7 @@ int main(void)
|
|||||||
|
|
||||||
failures += !(rawtime == 1608805850);
|
failures += !(rawtime == 1608805850);
|
||||||
|
|
||||||
p_timeinfo = gmtime(&rawtime);
|
p_timeinfo = localtime(&rawtime);
|
||||||
|
|
||||||
failures += !(p_timeinfo->tm_year == timeinfo.tm_year);
|
failures += !(p_timeinfo->tm_year == timeinfo.tm_year);
|
||||||
failures += !(p_timeinfo->tm_mon == timeinfo.tm_mon);
|
failures += !(p_timeinfo->tm_mon == timeinfo.tm_mon);
|
||||||
|
Reference in New Issue
Block a user