X-Git-Url: https://gitweb.ps.run/ps-cgit/blobdiff_plain/e189344a7dfe6fa1b07434d5170e6441dcbaf788..1a63cfcc3d83919e790e7e279eb35fc75adb0e3c:/ui-log.c diff --git a/ui-log.c b/ui-log.c index 4237921..75bbbe4 100644 --- a/ui-log.c +++ b/ui-log.c @@ -25,15 +25,11 @@ void inspect_files(struct diff_filepair *pair) void print_commit(struct commit *commit) { - char buf[32]; struct commitinfo *info; - struct tm *time; info = cgit_parse_commit(commit); - time = gmtime(&commit->date); html(""); - strftime(buf, sizeof(buf), "%Y-%m-%d %H:%M", time); - html_txt(buf); + cgit_print_age(commit->date, TM_WEEK * 2, FMT_SHORTDATE); html(""); char *qry = fmt("h=%s", sha1_to_hex(commit->object.sha1)); char *url = cgit_pageurl(cgit_query_repo, "commit", qry); @@ -85,7 +81,7 @@ void cgit_print_log(const char *tip, int ofs, int cnt, char *grep, char *path) prepare_revision_walk(&rev); html(""); - html("" + html("" ""); if (cgit_repo->enable_log_filecount) { @@ -118,14 +114,14 @@ void cgit_print_log(const char *tip, int ofs, int cnt, char *grep, char *path) if (ofs > 0) { html(" [prev] "); } if ((commit = get_revision(&rev)) != NULL) { html(" [next] "); } html("");
Date
AgeMessage