]> git.ipfire.org Git - thirdparty/git.git/commitdiff
Merge branch 'bb/t0006-negative-tz-offset'
authorJunio C Hamano <gitster@pobox.com>
Thu, 21 Mar 2024 21:55:14 +0000 (14:55 -0700)
committerJunio C Hamano <gitster@pobox.com>
Thu, 21 Mar 2024 21:55:14 +0000 (14:55 -0700)
More tests on showing time with negative TZ offset.

* bb/t0006-negative-tz-offset:
  t0006: add more tests with a negative TZ offset

1  2 
t/t0006-date.sh

diff --combined t/t0006-date.sh
index 1d228a981ee96471d36c173e3b0036f59d0395e2,d7d84a43fecff07c0a26e57e7b7040e3f4620354..3031256d143b154dc1ff5e55ae46a7ffd4c7cf6d
@@@ -46,7 -46,6 +46,7 @@@ check_show () 
  TIME='1466000000 +0200'
  check_show iso8601 "$TIME" '2016-06-15 16:13:20 +0200'
  check_show iso8601-strict "$TIME" '2016-06-15T16:13:20+02:00'
 +check_show iso8601-strict "$(echo "$TIME" | sed 's/+0200$/+0000/')" '2016-06-15T14:13:20Z'
  check_show rfc2822 "$TIME" 'Wed, 15 Jun 2016 16:13:20 +0200'
  check_show short "$TIME" '2016-06-15'
  check_show default "$TIME" 'Wed Jun 15 16:13:20 2016 +0200'
@@@ -70,6 -69,14 +70,14 @@@ check_show 'format:%s' '123456789 +1234
  check_show 'format:%s' '123456789 -1234' 123456789
  check_show 'format-local:%s' '123456789 -1234' 123456789
  
+ # negative TZ offset
+ TIME='1466000000 -0200'
+ check_show iso8601 "$TIME" '2016-06-15 12:13:20 -0200'
+ check_show iso8601-strict "$TIME" '2016-06-15T12:13:20-02:00'
+ check_show rfc2822 "$TIME" 'Wed, 15 Jun 2016 12:13:20 -0200'
+ check_show default "$TIME" 'Wed Jun 15 12:13:20 2016 -0200'
+ check_show raw "$TIME" '1466000000 -0200'
  # arbitrary time absurdly far in the future
  FUTURE="5758122296 -0400"
  check_show iso       "$FUTURE" "2152-06-19 18:24:56 -0400" TIME_IS_64BIT,TIME_T_IS_64BIT