aboutsummaryrefslogtreecommitdiff
path: root/ui-shared.c
diff refs
from: back
to: back
| flip
diff options
context:
space:
mode:
Diffstat (limited to 'ui-shared.c')
-rw-r--r--ui-shared.c13
1 files changed, 4 insertions, 9 deletions
diff --git a/ui-shared.c b/ui-shared.c
index 19cd521..1292ac9 100644
--- a/ui-shared.c
+++ b/ui-shared.c
@@ -604,24 +604,19 @@ void cgit_submodule_link(const char *class, char *path, const char *rev)
path[len - 1] = tail;
}
-static const char *fmt_date(time_t secs, const char *format, int local_time)
+void cgit_print_date(time_t secs, const char *format, int local_time)
{
- static char buf[64];
+ char buf[64];
struct tm *time;
if (!secs)
- return "";
+ return;
if (local_time)
time = localtime(&secs);
else
time = gmtime(&secs);
strftime(buf, sizeof(buf)-1, format, time);
- return buf;
-}
-
-void cgit_print_date(time_t secs, const char *format, int local_time)
-{
- html_txt(fmt_date(secs, format, local_time));
+ html_txt(buf);
}
static void print_rel_date(time_t t, double value,