diff options
author | Vincent Ambo <tazjin@google.com> | 2020-01-06T16·00+0000 |
---|---|---|
committer | Vincent Ambo <Vincent Ambo> | 2020-01-11T23·43+0000 |
commit | 8082d87da385e2a4aeaff915799d26feb42b83af (patch) | |
tree | a22174be203faacc06e3cccfaf698606c15952ae /third_party/git/builtin/blame.c | |
parent | 7ef0d62730840ded097b524104cc0a0904591a63 (diff) |
feat(third_party/git/date): add "dottime" format r/374
Adds dottime (as defined on https://dotti.me) as a timestamp format. This format is designed to simplify working with timestamps across many different timezones by keeping the timestamp format itself in UTC (and indicating this with a dot character), but appending the local offset. This is implemented as a new format because the timestamp needs to be rendered both as UTC and including the offset, an implementation using a strftime formatting string is not sufficient.
Diffstat (limited to 'third_party/git/builtin/blame.c')
-rw-r--r-- | third_party/git/builtin/blame.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/third_party/git/builtin/blame.c b/third_party/git/builtin/blame.c index b6534d4dea9a..7ebd51ae4d2e 100644 --- a/third_party/git/builtin/blame.c +++ b/third_party/git/builtin/blame.c @@ -989,6 +989,9 @@ parse_done: case DATE_STRFTIME: blame_date_width = strlen(show_date(0, 0, &blame_date_mode)) + 1; /* add the null */ break; + case DATE_DOTTIME: + blame_date_width = sizeof("2006-10-19T15·00-0700"); + break; } blame_date_width -= 1; /* strip the null */ |