diff options
| -rw-r--r-- | ui-shared.c | 20 | ||||
| -rw-r--r-- | ui-shared.h | 1 |
2 files changed, 0 insertions, 21 deletions
diff --git a/ui-shared.c b/ui-shared.c index eaa45fb..d1f9249 100644 --- a/ui-shared.c +++ b/ui-shared.c | |||
| @@ -607,26 +607,6 @@ void cgit_submodule_link(const char *class, char *path, const char *rev) | |||
| 607 | path[len - 1] = tail; | 607 | path[len - 1] = tail; |
| 608 | } | 608 | } |
| 609 | 609 | ||
| 610 | static const char *fmt_date(time_t secs, const char *format, int local_time) | ||
| 611 | { | ||
| 612 | static char buf[64]; | ||
| 613 | struct tm *time; | ||
| 614 | |||
| 615 | if (!secs) | ||
| 616 | return ""; | ||
| 617 | if (local_time) | ||
| 618 | time = localtime(&secs); | ||
| 619 | else | ||
| 620 | time = gmtime(&secs); | ||
| 621 | strftime(buf, sizeof(buf)-1, format, time); | ||
| 622 | return buf; | ||
| 623 | } | ||
| 624 | |||
| 625 | void cgit_print_date(time_t secs, const char *format, int local_time) | ||
| 626 | { | ||
| 627 | html_txt(fmt_date(secs, format, local_time)); | ||
| 628 | } | ||
| 629 | |||
| 630 | const struct date_mode *cgit_date_mode(const char *format) | 610 | const struct date_mode *cgit_date_mode(const char *format) |
| 631 | { | 611 | { |
| 632 | static struct date_mode mode; | 612 | static struct date_mode mode; |
diff --git a/ui-shared.h b/ui-shared.h index e42f13a..43789de 100644 --- a/ui-shared.h +++ b/ui-shared.h | |||
| @@ -62,7 +62,6 @@ extern void cgit_print_error(const char *fmt, ...); | |||
| 62 | __attribute__((format (printf,1,0))) | 62 | __attribute__((format (printf,1,0))) |
| 63 | extern void cgit_vprint_error(const char *fmt, va_list ap); | 63 | extern void cgit_vprint_error(const char *fmt, va_list ap); |
| 64 | extern const struct date_mode *cgit_date_mode(const char *format); | 64 | extern const struct date_mode *cgit_date_mode(const char *format); |
| 65 | extern void cgit_print_date(time_t secs, const char *format, int local_time); | ||
| 66 | extern void cgit_print_age(time_t t, int tz, time_t max_relative); | 65 | extern void cgit_print_age(time_t t, int tz, time_t max_relative); |
| 67 | extern void cgit_print_http_headers(void); | 66 | extern void cgit_print_http_headers(void); |
| 68 | extern void cgit_redirect(const char *url, bool permanent); | 67 | extern void cgit_redirect(const char *url, bool permanent); |
