]> gitweb.ps.run Git - ps-cgit/blobdiff - ui-shared.c
git: update to v2.7.1
[ps-cgit] / ui-shared.c
index 3ce86fe7c8a82511adc70d6819605107844dafff..d1f92498507daf1904e32a3945a31f1882b2fdd2 100644 (file)
@@ -607,26 +607,6 @@ 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)
-{
-       static char buf[64];
-       struct tm *time;
-
-       if (!secs)
-               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));
-}
-
 const struct date_mode *cgit_date_mode(const char *format)
 {
        static struct date_mode mode;
@@ -801,7 +781,7 @@ void cgit_print_docend(void)
        else {
                htmlf("<div class='footer'>generated by <a href='http://git.zx2c4.com/cgit/about/'>cgit %s</a> at ",
                        cgit_version);
-               cgit_print_date(time(NULL), FMT_LONGDATE, ctx.cfg.local_time);
+               html_txt(show_date(time(NULL), 0, cgit_date_mode(FMT_LONGDATE)));
                html("</div>\n");
        }
        html("</div> <!-- id=cgit -->\n");