From: Shengfa Lin Date: Fri, 02 Oct 2020 06:41:05 GMT Subject: Re: [RFC PATCH 1/1] hideTimezone: add a user.hideTimezone config Message-ID: <20201002064105.4089915-1-shengfa@google.com> In-Reply-To: Junio C Hamano writes: >> test_config user.hideTimeZone true && >> ( >> export GIT_AUTHOR_DATE=@1600000000 TZ=UTC-09 && >> git commit ... && >> git show -s --format='%aI' >output && >> echo 2020-09-13T15:26:40+03:00 >expect && > > Oops. The sample date and zone must be adjusted for the values > exported above. I expect that we'd need to do > > ... > echo 2020-09-13T12:26:40+00:00 >expect && > test_cmp expect output Tested the following: test_expect_success 'commit date shows timezone offset +0000 when user.hideTimezone is true' ' test_config user.hideTimezone true && ( echo test2 >file && git add file && export GIT_AUTHOR_DATE=@1600000000 TZ=UTC-09 && git commit -m "test2" && git show -s --format='%aI' >output && echo 2020-09-13T12:26:40+00:00 >expect && test_cmp output expect ) '