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
2016-01-19 19:33:05 +00:00
提交者 Jason A. Donenfeld
父節點 21dcf10386
當前提交 f2a901d2e1
共有 5 個檔案被更改,包括 18 行新增18 行删除

查看文件

@ -73,7 +73,7 @@ static int print_branch(struct refinfo *ref)
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 @@ static int print_tag(struct refinfo *ref)
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");