X-Git-Url: https://gitweb.ps.run/ps-cgit/blobdiff_plain/17890d0058c1555133c8767ceb123e809e6971ab..02a545e:/ui-shared.c diff --git a/ui-shared.c b/ui-shared.c index cd98387..197ee37 100644 --- a/ui-shared.c +++ b/ui-shared.c @@ -353,14 +353,17 @@ void cgit_object_link(struct object *obj) html_link_close(); } -void cgit_print_date(time_t secs, char *format) +void cgit_print_date(time_t secs, char *format, int local_time) { char buf[64]; struct tm *time; if (!secs) return; - time = gmtime(&secs); + if(local_time) + time = localtime(&secs); + else + time = gmtime(&secs); strftime(buf, sizeof(buf)-1, format, time); html_txt(buf); } @@ -375,7 +378,7 @@ void cgit_print_age(time_t t, time_t max_relative, char *format) secs = now - t; if (secs > max_relative && max_relative >= 0) { - cgit_print_date(t, format); + cgit_print_date(t, format, ctx.cfg.local_time); return; } @@ -437,16 +440,27 @@ void cgit_print_docstart(struct cgit_context *ctx) html("\n"); + if (ctx->cfg.favicon) { + html("\n"); + } html("\n"); html("
\n"); } void cgit_print_docend() { - html("\n\n