commit - cbe7b7d7141fcd8437b7ea83d5c1f4f84b9e6981
commit + 10fa70e266dcd8539efd48ef30628e48068cb5b4
blob - 17ccc57c2c33ce3bdbf92fe4b70615c83efa04e6
blob + 17655d809061e6c714a1d7b150302233dafe4f5e
--- gotwebd/gotweb.c
+++ gotwebd/gotweb.c
if (tp_writes(tp, datebuf) == -1 ||
tp_writes(tp, " UTC") == -1)
- return -1;
- break;
- case TM_RFC822:
- if (gmtime_r(&committer_time, &tm) == NULL)
- return -1;
-
- r = strftime(datebuf, sizeof(datebuf),
- "%a, %d %b %Y %H:%M:%S GMT", &tm);
- if (r == 0)
return -1;
-
- if (tp_writes(tp, datebuf) == -1)
- return -1;
break;
}
return 0;
blob - 8e18e98aad26908b7294403e5baed1ce637e1368
blob + 973ce5ba19977634ab3437a3557bdff3a8f03439
--- gotwebd/gotwebd.h
+++ gotwebd/gotwebd.h
enum gotweb_ref_tm {
TM_DIFF,
TM_LONG,
- TM_RFC822,
};
extern struct gotwebd *gotwebd_env;
blob - 15e76f92a8e1e904a1d67de07ba474e2d0161c0c
blob + 7c8ae023b9acffb8f74ebb838e31638043b1e25b
--- gotwebd/pages.tmpl
+++ gotwebd/pages.tmpl
struct request *c = tp->tp_arg;
struct transport *t = c->t;
struct repo_dir *repo_dir = t->repo_dir;
+ struct tm tm;
+ char rfc822[128];
+ int r;
char *tag_name = rt->tag_name;
struct gotweb_url tag = {
.action = TAG,
if (strncmp(tag_name, "refs/tags/", 10) == 0)
tag_name += 10;
+
+ if (gmtime_r(&rt->tagger_time, &tm) == NULL)
+ return -1;
+ r = strftime(rfc822, sizeof(rfc822), "%a, %d %b %Y %H:%M:%S GMT", &tm);
+ if (r == 0)
+ return 0;
!}
<item>
<title>{{ repo_dir->name }} {{" "}} {{ tag_name }}</title>
{{ render rss_author(tp, rt->tagger) }}
<guid isPermaLink="false">{{ rt->commit_id }}</guid>
<pubDate>
- {{ render gotweb_render_age(tp, rt->tagger_time, TM_RFC822) }}
+ {{ rfc822 }}
</pubDate>
</item>
{{ end }}