From ee646eb48f9a7fc6c225facf2b7449a8a65ef8f2 Mon Sep 17 00:00:00 2001 From: Haitao Li Date: Fri, 9 Sep 2011 18:10:33 +0800 Subject: date.c: Support iso8601 timezone formats Timezone designators in the following formats are all valid according to ISO8601:2004, section 4.3.2: [+-]hh, [+-]hhmm, [+-]hh:mm but we have ignored the ones with colon so far. Signed-off-by: Haitao Li Helped-by: Jeff King Signed-off-by: Junio C Hamano --- t/t0006-date.sh | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 't/t0006-date.sh') diff --git a/t/t0006-date.sh b/t/t0006-date.sh index f87abb5a0..1d29810a7 100755 --- a/t/t0006-date.sh +++ b/t/t0006-date.sh @@ -40,6 +40,12 @@ check_parse 2008-02 bad check_parse 2008-02-14 bad check_parse '2008-02-14 20:30:45' '2008-02-14 20:30:45 +0000' check_parse '2008-02-14 20:30:45 -0500' '2008-02-14 20:30:45 -0500' +check_parse '2008-02-14 20:30:45 -0015' '2008-02-14 20:30:45 -0015' +check_parse '2008-02-14 20:30:45 -5' '2008-02-14 20:30:45 +0000' +check_parse '2008-02-14 20:30:45 -5:' '2008-02-14 20:30:45 +0000' +check_parse '2008-02-14 20:30:45 -05' '2008-02-14 20:30:45 -0500' +check_parse '2008-02-14 20:30:45 -:30' '2008-02-14 20:30:45 +0000' +check_parse '2008-02-14 20:30:45 -05:00' '2008-02-14 20:30:45 -0500' check_parse '2008-02-14 20:30:45' '2008-02-14 20:30:45 -0500' EST5 check_approxidate() { -- cgit v1.2.1