From 57ea1aa2a5eab7f6aba702b3366fe4dcc72124f6 Mon Sep 17 00:00:00 2001 From: John Keeping Date: Tue, 19 Jan 2016 19:33:01 +0000 Subject: ui-shared: remove "format" from cgit_print_age() We never use any format other than FMT_SHORTDATE, so move that into the function. Signed-off-by: John Keeping --- ui-log.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'ui-log.c') diff --git a/ui-log.c b/ui-log.c index a4dc707..5f6a69c 100644 --- a/ui-log.c +++ b/ui-log.c @@ -204,7 +204,7 @@ static void print_commit(struct commit *commit, struct rev_info *revs) } else { html(""); - cgit_print_age(commit->date, TM_WEEK * 2, FMT_SHORTDATE); + cgit_print_age(commit->date, TM_WEEK * 2); html(""); } @@ -244,7 +244,7 @@ static void print_commit(struct commit *commit, struct rev_info *revs) if (revs->graph) { html(""); - cgit_print_age(commit->date, TM_WEEK * 2, FMT_SHORTDATE); + cgit_print_age(commit->date, TM_WEEK * 2); } if (!lines_counted && (ctx.repo->enable_log_filecount || -- cgit v1.1 From f2a901d2e1db5217d6890b26c6dc1ec119505d02 Mon Sep 17 00:00:00 2001 From: John Keeping Date: Tue, 19 Jan 2016 19:33:05 +0000 Subject: 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 --- ui-log.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'ui-log.c') diff --git a/ui-log.c b/ui-log.c index 5f6a69c..0a3938b 100644 --- a/ui-log.c +++ b/ui-log.c @@ -204,7 +204,7 @@ static void print_commit(struct commit *commit, struct rev_info *revs) } else { html(""); - cgit_print_age(commit->date, TM_WEEK * 2); + cgit_print_age(info->committer_date, info->committer_tz, TM_WEEK * 2); html(""); } @@ -244,7 +244,7 @@ static void print_commit(struct commit *commit, struct rev_info *revs) if (revs->graph) { html(""); - 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 || -- cgit v1.1