Skip to content

Commit e4e9d5f

Browse files
bbolligitster
authored andcommitted
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 <[email protected]>
1 parent 3c2a3fd commit e4e9d5f

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

t/t0006-date.sh

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,14 @@ check_show 'format:%s' '123456789 +1234' 123456789
6969
check_show 'format:%s' '123456789 -1234' 123456789
7070
check_show 'format-local:%s' '123456789 -1234' 123456789
7171

72+
# negative TZ offset
73+
TIME='1466000000 -0200'
74+
check_show iso8601 "$TIME" '2016-06-15 12:13:20 -0200'
75+
check_show iso8601-strict "$TIME" '2016-06-15T12:13:20-02:00'
76+
check_show rfc2822 "$TIME" 'Wed, 15 Jun 2016 12:13:20 -0200'
77+
check_show default "$TIME" 'Wed Jun 15 12:13:20 2016 -0200'
78+
check_show raw "$TIME" '1466000000 -0200'
79+
7280
# arbitrary time absurdly far in the future
7381
FUTURE="5758122296 -0400"
7482
check_show iso "$FUTURE" "2152-06-19 18:24:56 -0400" TIME_IS_64BIT,TIME_T_IS_64BIT

0 commit comments

Comments
 (0)