Diffstat (limited to 'ui-shared.c')
| -rw-r--r-- | ui-shared.c | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/ui-shared.c b/ui-shared.c index 197ee37..4280a70 100644 --- a/ui-shared.c +++ b/ui-shared.c @@ -353,17 +353,14 @@ void cgit_object_link(struct object *obj) html_link_close(); } -void cgit_print_date(time_t secs, char *format, int local_time) +void cgit_print_date(time_t secs, char *format) { char buf[64]; struct tm *time; if (!secs) return; - if(local_time) - time = localtime(&secs); - else - time = gmtime(&secs); + time = gmtime(&secs); strftime(buf, sizeof(buf)-1, format, time); html_txt(buf); } @@ -378,7 +375,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, ctx.cfg.local_time); + cgit_print_date(t, format); return; } @@ -456,7 +453,7 @@ void cgit_print_docend() html_include(ctx.cfg.footer); else { html("<div class='footer'>generated "); - cgit_print_date(time(NULL), FMT_LONGDATE, ctx.cfg.local_time); + cgit_print_date(time(NULL), FMT_LONGDATE); htmlf(" by cgit %s", cgit_version); html("</div>\n"); } |