1
0
mirror of https://github.com/cc65/cc65.git synced 2024-11-12 22:07: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:
Oliver Schmidt 2018-08-02 15:45:57 +02:00 committed by GitHub
parent ad6c2dbe7b
commit 753b48647f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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);