about summary refs log tree commit diff
path: root/third_party/git/t/t0006-date.sh
diff options
context:
space:
mode:
authorVincent Ambo <tazjin@google.com>2020-01-06T16·00+0000
committerVincent Ambo <Vincent Ambo>2020-01-11T23·43+0000
commit8082d87da385e2a4aeaff915799d26feb42b83af (patch)
treea22174be203faacc06e3cccfaf698606c15952ae /third_party/git/t/t0006-date.sh
parent7ef0d62730840ded097b524104cc0a0904591a63 (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/t/t0006-date.sh')
-rwxr-xr-xthird_party/git/t/t0006-date.sh2
1 files changed, 2 insertions, 0 deletions
diff --git a/third_party/git/t/t0006-date.sh b/third_party/git/t/t0006-date.sh
index d9fcc829a9e6..b723db1f766c 100755
--- a/third_party/git/t/t0006-date.sh
+++ b/third_party/git/t/t0006-date.sh
@@ -49,9 +49,11 @@ check_show short "$TIME" '2016-06-15'
 check_show default "$TIME" 'Wed Jun 15 16:13:20 2016 +0200'
 check_show raw "$TIME" '1466000000 +0200'
 check_show unix "$TIME" '1466000000'
+check_show dottime "$TIME" '2016-06-15T14·13+0200'
 check_show iso-local "$TIME" '2016-06-15 14:13:20 +0000'
 check_show raw-local "$TIME" '1466000000 +0000'
 check_show unix-local "$TIME" '1466000000'
+check_show dottime-local "$TIME" '2016-06-15T14·13+0000'
 
 check_show 'format:%z' "$TIME" '+0200'
 check_show 'format-local:%z' "$TIME" '+0000'