From f8a3724f7c627ec604bfdc4c0651478be34ae2b8 Mon Sep 17 00:00:00 2001 From: "C. McEnroe" Date: Thu, 23 Apr 2020 15:41:44 -0400 Subject: Add generate time footer --- html.c | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) (limited to 'html.c') diff --git a/html.c b/html.c index b883414..b138e73 100644 --- a/html.c +++ b/html.c @@ -395,5 +395,18 @@ int htmlSubthreadClose(FILE *file) { } int htmlThreadClose(FILE *file) { - return templateRender(file, TEMPLATE(), NULL, NULL); + const char *template = TEMPLATE( + + + ); + time_t now = time(NULL); + char time[sizeof("0000-00-00T00:00:00Z")]; + strftime(time, sizeof(time), "%FT%TZ", gmtime(&now)); + struct Variable vars[] = { + { "time", time }, + {0}, + }; + return templateRender(file, template, vars, escapeXML); } -- cgit 1.4.1