From: John Keeping Date: Thu, 13 Aug 2015 11:24:33 +0000 (+0100) Subject: ui-shared: use common function in print_rel_date() X-Git-Tag: v0.12~76 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=b44dd95f13f039cd9bee301655150ff765d9555e;p=cgit ui-shared: use common function in print_rel_date() Signed-off-by: John Keeping --- diff --git a/ui-shared.c b/ui-shared.c index 19cd521..bbb277a 100644 --- a/ui-shared.c +++ b/ui-shared.c @@ -627,17 +627,8 @@ void cgit_print_date(time_t secs, const char *format, int local_time) static void print_rel_date(time_t t, double value, const char *class, const char *suffix) { - char buf[64]; - struct tm *time; - - if (ctx.cfg.local_time) - time = localtime(&t); - else - time = gmtime(&t); - strftime(buf, sizeof(buf) - 1, FMT_LONGDATE, time); - htmlf("%.0f %s", value, suffix); }