From 45c87ca1c32dcd5ffd4a681fadf05627d9ce7770 Mon Sep 17 00:00:00 2001 From: John Keeping Date: Tue, 19 Jan 2016 19:33:02 +0000 Subject: parsing: add timezone to ident structures This will allow us to mimic Git's behaviour of showing times in the originator's timezone when displaying commits and tags. Signed-off-by: John Keeping --- cgit.h | 3 +++ 1 file changed, 3 insertions(+) (limited to 'cgit.h') diff --git a/cgit.h b/cgit.h index de5c94a..501cb48 100644 --- a/cgit.h +++ b/cgit.h @@ -130,9 +130,11 @@ struct commitinfo { char *author; char *author_email; unsigned long author_date; + int author_tz; char *committer; char *committer_email; unsigned long committer_date; + int committer_tz; char *subject; char *msg; char *msg_encoding; @@ -142,6 +144,7 @@ struct taginfo { char *tagger; char *tagger_email; unsigned long tagger_date; + int tagger_tz; char *msg; }; -- cgit v1.1 From 9c15f3c6954e43c5ffd36230e666eccf112803f2 Mon Sep 17 00:00:00 2001 From: John Keeping Date: Mon, 8 Feb 2016 15:05:54 +0000 Subject: Avoid DATE_STRFTIME for long/short dates Git's DATE_STRFTIME ignores the timezone argument and just uses the local timezone regardless of whether the "local" flag is set. Since our existing FMT_LONGDATE and FMT_SHORTDATE are pretty-much perfect matches to DATE_ISO8601 and DATE_SHORT, switch to taking a date_mode_type directly in cgit_date_mode(). Signed-off-by: John Keeping --- cgit.h | 2 -- 1 file changed, 2 deletions(-) (limited to 'cgit.h') diff --git a/cgit.h b/cgit.h index 501cb48..5adef4d 100644 --- a/cgit.h +++ b/cgit.h @@ -32,8 +32,6 @@ /* * Dateformats used on misc. pages */ -#define FMT_LONGDATE "%Y-%m-%d %H:%M:%S (%Z)" -#define FMT_SHORTDATE "%Y-%m-%d" #define FMT_ATOMDATE "%Y-%m-%dT%H:%M:%SZ" -- cgit v1.1 From 75298209bf8386656b82f185e2901690ac5b671c Mon Sep 17 00:00:00 2001 From: John Keeping Date: Mon, 8 Feb 2016 15:06:27 +0000 Subject: ui-atom: avoid DATE_STRFTIME Git's DATE_STRFTIME ignores the timezone argument and just uses the local timezone regardless of whether the "local" flag is set. Since Atom accepts ISO8601 dates [1], we can use Git's DATE_ISO8601_STRICT instead, which does get this right. Additionally, we never use the local timezone here so we can use the date_mode_from_type() wrapper to simplify the code a bit. [1] https://tools.ietf.org/html/rfc4287#section-3.3 Signed-off-by: John Keeping --- cgit.h | 5 ----- 1 file changed, 5 deletions(-) (limited to 'cgit.h') diff --git a/cgit.h b/cgit.h index 5adef4d..d10c799 100644 --- a/cgit.h +++ b/cgit.h @@ -29,11 +29,6 @@ #undef isgraph #define isgraph(x) (isprint((x)) && !isspace((x))) -/* - * Dateformats used on misc. pages - */ -#define FMT_ATOMDATE "%Y-%m-%dT%H:%M:%SZ" - /* * Limits used for relative dates -- cgit v1.1 From 5f2664f13c90f083b827d8fafa6cfc01c0c4f513 Mon Sep 17 00:00:00 2001 From: "Jason A. Donenfeld" Date: Mon, 22 Feb 2016 16:04:15 +0100 Subject: ui-shared: add homepage to tabs Signed-off-by: Jason A. Donenfeld --- cgit.h | 1 + 1 file changed, 1 insertion(+) (limited to 'cgit.h') diff --git a/cgit.h b/cgit.h index d10c799..325432b 100644 --- a/cgit.h +++ b/cgit.h @@ -81,6 +81,7 @@ struct cgit_repo { char *path; char *desc; char *owner; + char *homepage; char *defbranch; char *module_link; struct string_list readme; -- cgit v1.1