ui: show ages in the originator's timezone This affects the tooltip showing the full time and the case when a date is sufficiently old to be shown in full rather than as an offset. Signed-off-by: John Keeping <john@keeping.me.uk>
John Keeping john@keeping.me.uk
Tue, 19 Jan 2016 19:33:05 +0000
5 files changed,
18 insertions(+),
18 deletions(-)
M
ui-log.c
→
ui-log.c
@@ -204,7 +204,7 @@ strbuf_setlen(&graphbuf, 0);
} else { html("<td>"); - cgit_print_age(commit->date, TM_WEEK * 2); + cgit_print_age(info->committer_date, info->committer_tz, TM_WEEK * 2); html("</td>"); }@@ -244,7 +244,7 @@ cgit_close_filter(ctx.repo->email_filter);
if (revs->graph) { html("</td><td>"); - cgit_print_age(commit->date, TM_WEEK * 2); + cgit_print_age(info->committer_date, info->committer_tz, TM_WEEK * 2); } if (!lines_counted && (ctx.repo->enable_log_filecount ||
M
ui-refs.c
→
ui-refs.c
@@ -73,7 +73,7 @@ cgit_open_filter(ctx.repo->email_filter, info->author_email, "refs");
html_txt(info->author); cgit_close_filter(ctx.repo->email_filter); html("</td><td colspan='2'>"); - cgit_print_age(info->commit->date, -1); + cgit_print_age(info->committer_date, info->committer_tz, -1); } else { html("</td><td></td><td>"); cgit_object_link(ref->object);@@ -161,9 +161,9 @@ }
html("</td><td colspan='2'>"); if (info) { if (info->tagger_date > 0) - cgit_print_age(info->tagger_date, -1); + cgit_print_age(info->tagger_date, info->tagger_tz, -1); } else if (ref->object->type == OBJ_COMMIT) { - cgit_print_age(ref->commit->commit->date, -1); + cgit_print_age(ref->commit->commit->date, 0, -1); } html("</td></tr>\n");
M
ui-repolist.c
→
ui-repolist.c
@@ -79,7 +79,7 @@ static void print_modtime(struct cgit_repo *repo)
{ time_t t; if (get_repo_modtime(repo, &t)) - cgit_print_age(t, -1); + cgit_print_age(t, 0, -1); } static int is_match(struct cgit_repo *repo)