From 74ab65661b57a2f76b1b96553203a6e0c8f74cd9 Mon Sep 17 00:00:00 2001 From: Birger Schacht Date: Feb 12 2019 18:43:49 +0000 Subject: 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. --- 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 == '.') {