X-Git-Url: https://gitweb.ps.run/ps-cgit/blobdiff_plain/f03e3cb8a5c6b597b87321e1f082d3ab177e8baa..a360666df3cfcd1b384cd66b18803d72e3893b3d:/ui-shared.c?ds=sidebyside
diff --git a/ui-shared.c b/ui-shared.c
index 19cd521..36fcb21 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);
}
@@ -653,7 +644,11 @@ void cgit_print_age(time_t t, time_t max_relative, const char *format)
secs = 0;
if (secs > max_relative && max_relative >= 0) {
+ html("");
cgit_print_date(t, format, ctx.cfg.local_time);
+ html("");
return;
}