Skip to content

Commit e577fec

Browse files
committed
Merge branch 'bb/t0006-negative-tz-offset'
More tests on showing time with negative TZ offset. * bb/t0006-negative-tz-offset: t0006: add more tests with a negative TZ offset
2 parents 1f49f75 + e4e9d5f commit e577fec

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
@@ -70,6 +70,14 @@ check_show 'format:%s' '123456789 +1234' 123456789
7070
check_show 'format:%s' '123456789 -1234' 123456789
7171
check_show 'format-local:%s' '123456789 -1234' 123456789
7272

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

0 commit comments

Comments
 (0)