about summary refs log tree commit diff stats
path: root/ui-refs.c
diff options
context:
space:
mode:
authorJohn Keeping2016-01-19 19:33:05 +0000
committerJason A. Donenfeld2016-02-08 14:22:21 +0100
commitf2a901d2e1db5217d6890b26c6dc1ec119505d02 (patch)
tree72f3039748dcf1b00b3d5741cc6282dee7f5492c /ui-refs.c
parentui-{commit,tag}: show dates in originator's timezone (diff)
downloadcgit-f2a901d2e1db5217d6890b26c6dc1ec119505d02.tar.gz
cgit-f2a901d2e1db5217d6890b26c6dc1ec119505d02.zip
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>
Diffstat (limited to 'ui-refs.c')
-rw-r--r--ui-refs.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/ui-refs.c b/ui-refs.c index 0652b89..5b4530e 100644 --- a/ui-refs.c +++ b/ui-refs.c
@@ -73,7 +73,7 @@ static int print_branch(struct refinfo *ref)
73 html_txt(info->author); 73 html_txt(info->author);
74 cgit_close_filter(ctx.repo->email_filter); 74 cgit_close_filter(ctx.repo->email_filter);
75 html("</td><td colspan='2'>"); 75 html("</td><td colspan='2'>");
76 cgit_print_age(info->commit->date, -1); 76 cgit_print_age(info->committer_date, info->committer_tz, -1);
77 } else { 77 } else {
78 html("</td><td></td><td>"); 78 html("</td><td></td><td>");
79 cgit_object_link(ref->object); 79 cgit_object_link(ref->object);
@@ -161,9 +161,9 @@ static int print_tag(struct refinfo *ref)
161 html("</td><td colspan='2'>"); 161 html("</td><td colspan='2'>");
162 if (info) { 162 if (info) {
163 if (info->tagger_date > 0) 163 if (info->tagger_date > 0)
164 cgit_print_age(info->tagger_date, -1); 164 cgit_print_age(info->tagger_date, info->tagger_tz, -1);
165 } else if (ref->object->type == OBJ_COMMIT) { 165 } else if (ref->object->type == OBJ_COMMIT) {
166 cgit_print_age(ref->commit->commit->date, -1); 166 cgit_print_age(ref->commit->commit->date, 0, -1);
167 } 167 }
168 html("</td></tr>\n"); 168 html("</td></tr>\n");
169 169