From: Beat Bolli Date: Thu, 14 Mar 2024 08:55:12 +0000 (+0100) Subject: t0006: add more tests with a negative TZ offset X-Git-Tag: v2.45.0-rc0~85^2 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=e4e9d5fa97c2ad989a98fda253b9700e2b224d37;p=thirdparty%2Fgit.git t0006: add more tests with a negative TZ offset This test doesn't systematically check a negative timezone offset. Add a test for each format that outputs the offset to improve our test coverage. Signed-off-by: Beat Bolli --- diff --git a/t/t0006-date.sh b/t/t0006-date.sh index e18b160286..d7d84a43fe 100755 --- a/t/t0006-date.sh +++ b/t/t0006-date.sh @@ -69,6 +69,14 @@ check_show 'format:%s' '123456789 +1234' 123456789 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