diff --git a/t/t0006-date.sh b/t/t0006-date.sh index 04ce53509c..d1856402b7 100755 --- a/t/t0006-date.sh +++ b/t/t0006-date.sh @@ -48,10 +48,17 @@ check_show default "$TIME" 'Wed Jun 15 16:13:20 2016 +0200' check_show raw "$TIME" '1466000000 +0200' check_show iso-local "$TIME" '2016-06-15 14:13:20 +0000' -# arbitrary time absurdly far in the future -FUTURE="5758122296 -0400" -check_show iso "$FUTURE" "2152-06-19 18:24:56 -0400" -check_show iso-local "$FUTURE" "2152-06-19 22:24:56 +0000" +case "$(test-date show:iso 9999999999)" in +*2038*) + # on this platform, unsigned long is 32-bit, i.e. not large enough + ;; +*) + # arbitrary time absurdly far in the future + FUTURE="5758122296 -0400" + check_show iso "$FUTURE" "2152-06-19 18:24:56 -0400" + check_show iso-local "$FUTURE" "2152-06-19 22:24:56 +0000" + ;; +esac check_parse() { echo "$1 -> $2" >expect