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.
master
Birger Schacht 6 years ago committed by Drew DeVault
parent 71a57942af
commit 74ab65661b
  1. 2
      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 == '.') {

Loading…
Cancel
Save