feat(third_party/git/date): add "dottime" format
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.
This commit is contained in:
parent
7ef0d62730
commit
8082d87da3
5 changed files with 27 additions and 1 deletions
3
third_party/git/builtin/blame.c
vendored
3
third_party/git/builtin/blame.c
vendored
|
|
@ -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 */
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue