author | Stefan Naewe <stefan.naewe@atlas-elektronik.com> | 2008-08-01 12:54:38 (UTC) |
---|---|---|
committer | Lars Hjemli <hjemli@gmail.com> | 2008-08-01 20:09:13 (UTC) |
commit | 0f0ab148c6d444316af10e6b4c7a60630fed45d3 (patch) (unidiff) | |
tree | a52c08e648c5d656866cecf78e757f2f85211b19 /ui-tag.c | |
parent | a1266edfe6ec1fd678c8f6b60ffbd21d88ff5a93 (diff) | |
download | cgit-0f0ab148c6d444316af10e6b4c7a60630fed45d3.zip cgit-0f0ab148c6d444316af10e6b4c7a60630fed45d3.tar.gz cgit-0f0ab148c6d444316af10e6b4c7a60630fed45d3.tar.bz2 |
Added `local-time` option to cgitrc
When `local-time` is set, commit, tag and patch timestamps will be printed
in the servers timezone. Also, regardless of the value of `local-time`,
these timestamps will now always show the timezone.
Signed-off-by: Stefan Naewe <stefan.naewe@atlas-elektronik.com>
Signed-off-by: Lars Hjemli <hjemli@gmail.com>
-rw-r--r-- | ui-tag.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -36,40 +36,40 @@ void cgit_print_tag(char *revname) | |||
36 | struct object *obj; | 36 | struct object *obj; |
37 | struct tag *tag; | 37 | struct tag *tag; |
38 | struct taginfo *info; | 38 | struct taginfo *info; |
39 | 39 | ||
40 | if (get_sha1(revname, sha1)) { | 40 | if (get_sha1(revname, sha1)) { |
41 | cgit_print_error(fmt("Bad tag reference: %s", revname)); | 41 | cgit_print_error(fmt("Bad tag reference: %s", revname)); |
42 | return; | 42 | return; |
43 | } | 43 | } |
44 | obj = parse_object(sha1); | 44 | obj = parse_object(sha1); |
45 | if (!obj) { | 45 | if (!obj) { |
46 | cgit_print_error(fmt("Bad object id: %s", sha1_to_hex(sha1))); | 46 | cgit_print_error(fmt("Bad object id: %s", sha1_to_hex(sha1))); |
47 | return; | 47 | return; |
48 | } | 48 | } |
49 | if (obj->type == OBJ_TAG) { | 49 | if (obj->type == OBJ_TAG) { |
50 | tag = lookup_tag(sha1); | 50 | tag = lookup_tag(sha1); |
51 | if (!tag || parse_tag(tag) || !(info = cgit_parse_tag(tag))) { | 51 | if (!tag || parse_tag(tag) || !(info = cgit_parse_tag(tag))) { |
52 | cgit_print_error(fmt("Bad tag object: %s", revname)); | 52 | cgit_print_error(fmt("Bad tag object: %s", revname)); |
53 | return; | 53 | return; |
54 | } | 54 | } |
55 | html("<table class='commit-info'>\n"); | 55 | html("<table class='commit-info'>\n"); |
56 | htmlf("<tr><td>Tag name</td><td>%s (%s)</td></tr>\n", | 56 | htmlf("<tr><td>Tag name</td><td>%s (%s)</td></tr>\n", |
57 | revname, sha1_to_hex(sha1)); | 57 | revname, sha1_to_hex(sha1)); |
58 | if (info->tagger_date > 0) { | 58 | if (info->tagger_date > 0) { |
59 | html("<tr><td>Tag date</td><td>"); | 59 | html("<tr><td>Tag date</td><td>"); |
60 | cgit_print_date(info->tagger_date, FMT_LONGDATE); | 60 | cgit_print_date(info->tagger_date, FMT_LONGDATE, ctx.cfg.local_time); |
61 | html("</td></tr>\n"); | 61 | html("</td></tr>\n"); |
62 | } | 62 | } |
63 | if (info->tagger) { | 63 | if (info->tagger) { |
64 | html("<tr><td>Tagged by</td><td>"); | 64 | html("<tr><td>Tagged by</td><td>"); |
65 | html_txt(info->tagger); | 65 | html_txt(info->tagger); |
66 | html("</td></tr>\n"); | 66 | html("</td></tr>\n"); |
67 | } | 67 | } |
68 | html("<tr><td>Tagged object</td><td>"); | 68 | html("<tr><td>Tagged object</td><td>"); |
69 | cgit_object_link(tag->tagged); | 69 | cgit_object_link(tag->tagged); |
70 | html("</td></tr>\n"); | 70 | html("</td></tr>\n"); |
71 | html("</table>\n"); | 71 | html("</table>\n"); |
72 | print_tag_content(info->msg); | 72 | print_tag_content(info->msg); |
73 | } | 73 | } |
74 | return; | 74 | return; |
75 | } | 75 | } |