time_t is signed

This commit is contained in:
Mark
2020-07-23 14:03:14 +03:00
parent 7b182e45be
commit 75ab196866
+1 -1
View File
@@ -9,7 +9,7 @@ int main(int argc, char **argv) {
char buf[256];
gettimeofday(&tv0, NULL);
struct tm tm0;
gmtime_r(&tv0.tv_sec, &tm0);
gmtime_r((time_t *) &tv0.tv_sec, &tm0);
strftime(buf, sizeof(buf), "%c\n", &tm0);
write(STDOUT_FILENO, buf, strlen(buf));