{"thread":{"id":"61118","subject":"[PATCH] t0006: add more tests with a negative TZ offset","startedAt":"2024-03-14T08:55:20Z","lastAt":"2024-03-14T08:55:20Z","messageCount":1,"participants":["Beat Bolli"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"490614","messageId":"20240314085512.1827031-1-dev+git@drbeat.li","threadId":"61118","inReplyTo":null,"subject":"[PATCH] t0006: add more tests with a negative TZ offset","fromName":"Beat Bolli","fromEmail":"dev+git@drbeat.li","sentAt":"2024-03-14T08:55:12Z","receivedAt":"2024-03-14T08:55:20Z","isPatch":true,"sender":{"key":"dev+git@drbeat.li","avatar":"https://avatars.githubusercontent.com/u/21444?v=4"},"body":"This test doesn't systematically check a negative timezone offset. Add a\ntest for each format that outputs the offset to improve our test\ncoverage.\n\nSigned-off-by: Beat Bolli <dev+git@drbeat.li>\n---\n t/t0006-date.sh | 8 ++++++++\n 1 file changed, 8 insertions(+)\n\ndiff --git a/t/t0006-date.sh b/t/t0006-date.sh\nindex 1d228a981e..3031256d14 100755\n--- a/t/t0006-date.sh\n+++ b/t/t0006-date.sh\n@@ -70,6 +70,14 @@ check_show 'format:%s' '123456789 +1234' 123456789\n check_show 'format:%s' '123456789 -1234' 123456789\n check_show 'format-local:%s' '123456789 -1234' 123456789\n \n+# negative TZ offset\n+TIME='1466000000 -0200'\n+check_show iso8601 \"$TIME\" '2016-06-15 12:13:20 -0200'\n+check_show iso8601-strict \"$TIME\" '2016-06-15T12:13:20-02:00'\n+check_show rfc2822 \"$TIME\" 'Wed, 15 Jun 2016 12:13:20 -0200'\n+check_show default \"$TIME\" 'Wed Jun 15 12:13:20 2016 -0200'\n+check_show raw \"$TIME\" '1466000000 -0200'\n+\n # arbitrary time absurdly far in the future\n FUTURE=\"5758122296 -0400\"\n check_show iso       \"$FUTURE\" \"2152-06-19 18:24:56 -0400\" TIME_IS_64BIT,TIME_T_IS_64BIT\n-- \n2.42.0.583.ga47b40fd90\n\n"}]}