From 74ab65661b57a2f76b1b96553203a6e0c8f74cd9 Mon Sep 17 00:00:00 2001 From: Birger Schacht Date: Tue, 12 Feb 2019 19:29:28 +0100 Subject: [PATCH] Replace localtime with gmtime The localtime() function gives the time relative to the users time. This makes the generated manpage non reproducible. gmtime() gives the time as UTC. --- src/main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main.c b/src/main.c index 930cbca..72d677c 100644 --- a/src/main.c +++ b/src/main.c @@ -105,7 +105,7 @@ static void parse_preamble(struct parser *p) { } else { date_time = time(NULL); } - struct tm *date_tm = localtime(&date_time); + struct tm *date_tm = gmtime(&date_time); strftime(date, sizeof(date), "%F", date_tm); while ((ch = parser_getch(p)) != UTF8_INVALID) { if ((ch < 0x80 && isalnum(ch)) || ch == '_' || ch == '-' || ch == '.') {