scdoc2mdoc

A fork of scdoc to output mdoc(7)
git clone git://git.sgregoratto.me/scdoc2mdoc
Log | Files | Refs | README | LICENSE

commit 74ab65661b57a2f76b1b96553203a6e0c8f74cd9
parent 71a57942af1610d801c873e829de01dc3eff12f2
Author: Birger Schacht <birger@rantanplan.org>
Date:   Tue, 12 Feb 2019 19:29:28 +0100

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.

Diffstat:
Msrc/main.c | 2+-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git 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 == '.') {