diff options
-rw-r--r-- | ui-shared.c | 11 |
1 files changed, 1 insertions, 10 deletions
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) | |||
627 | static void print_rel_date(time_t t, double value, | 627 | static void print_rel_date(time_t t, double value, |
628 | const char *class, const char *suffix) | 628 | const char *class, const char *suffix) |
629 | { | 629 | { |
630 | char buf[64]; | ||
631 | struct tm *time; | ||
632 | |||
633 | if (ctx.cfg.local_time) | ||
634 | time = localtime(&t); | ||
635 | else | ||
636 | time = gmtime(&t); | ||
637 | strftime(buf, sizeof(buf) - 1, FMT_LONGDATE, time); | ||
638 | |||
639 | htmlf("<span class='%s' title='", class); | 630 | htmlf("<span class='%s' title='", class); |
640 | html_attr(buf); | 631 | html_attr(fmt_date(t, FMT_LONGDATE, ctx.cfg.local_time)); |
641 | htmlf("'>%.0f %s</span>", value, suffix); | 632 | htmlf("'>%.0f %s</span>", value, suffix); |
642 | } | 633 | } |
643 | 634 | ||