diff options
| author | Lars Hjemli | 2006-12-16 00:33:28 +0100 | 
|---|---|---|
| committer | Lars Hjemli | 2006-12-16 00:33:28 +0100 | 
| commit | 148fb9622c6a96021e572d1a372e38896506031f (patch) | |
| tree | 2bfde276f3fed3b3a42afbdd90a64c98d0502ae3 /ui-shared.c | |
| parent | 9a8f88658d51aeb86a79ac1121de13562ad2601f (diff) | |
| download | cgit-148fb9622c6a96021e572d1a372e38896506031f.tar.gz cgit-148fb9622c6a96021e572d1a372e38896506031f.tar.bz2 cgit-148fb9622c6a96021e572d1a372e38896506031f.zip  | |
Move cgit_print_date into ui-shared, reuse in ui-summary
Signed-off-by: Lars Hjemli <hjemli@gmail.com>
Diffstat (limited to 'ui-shared.c')
| -rw-r--r-- | ui-shared.c | 12 | 
1 files changed, 12 insertions, 0 deletions
diff --git a/ui-shared.c b/ui-shared.c index cb8a8df..1a6c127 100644 --- a/ui-shared.c +++ b/ui-shared.c  | |||
| @@ -60,6 +60,18 @@ char *cgit_pageurl(const char *reponame, const char *pagename, | |||
| 60 | } | 60 | } | 
| 61 | } | 61 | } | 
| 62 | 62 | ||
| 63 | |||
| 64 | void cgit_print_date(unsigned long secs) | ||
| 65 | { | ||
| 66 | char buf[32]; | ||
| 67 | struct tm *time; | ||
| 68 | |||
| 69 | time = gmtime(&secs); | ||
| 70 | strftime(buf, sizeof(buf), "%Y-%m-%d %H:%M:%S", time); | ||
| 71 | html_txt(buf); | ||
| 72 | |||
| 73 | } | ||
| 74 | |||
| 63 | void cgit_print_docstart(char *title, struct cacheitem *item) | 75 | void cgit_print_docstart(char *title, struct cacheitem *item) | 
| 64 | { | 76 | { | 
| 65 | html("Content-Type: text/html; charset=utf-8\n"); | 77 | html("Content-Type: text/html; charset=utf-8\n"); | 
