{"thread":{"id":"1494","subject":"[PATCH] fix null TZ problems on os/x","startedAt":"2005-08-13T10:22:46Z","lastAt":"2005-08-13T10:22:46Z","messageCount":1,"participants":["Brad Roberts"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"7183","messageId":"Pine.LNX.4.44.0508130308190.2136-100000@bellevue.puremagic.com","threadId":"1494","inReplyTo":null,"subject":"[PATCH] fix null TZ problems on os/x","fromName":"Brad Roberts","fromEmail":"braddr@puremagic.com","sentAt":"2005-08-13T10:22:46Z","receivedAt":"2005-08-13T10:22:46Z","isPatch":true,"sender":{"key":"braddr@puremagic.com","avatar":null},"body":"[PATCH] Fix TZ handling in tests, \"\" isn't a valid timezone at least on os/x\n\nIt seems that the localtime() libc routine doesn't care for finding a TZ\nthat's empty.  It's ok with TZ not being set.  Setting the TZ to GMT allowed\nthese tests to pass.\n\n$ uname -v\nDarwin Kernel Version 7.9.0: Wed Mar 30 20:11:17 PST 2005; root:xnu/xnu-517.12.7.obj~1/RELEASE_PPC\n\nSigned-off-by: Brad Roberts <braddr@puremagic.com>\n\n---\ndiff --git a/t/t1100-commit-tree-options.sh b/t/t1100-commit-tree-options.sh\n--- a/t/t1100-commit-tree-options.sh\n+++ b/t/t1100-commit-tree-options.sh\n@@ -32,7 +32,7 @@ test_expect_success \\\n      GIT_COMMITTER_NAME=\"Committer Name\" \\\n      GIT_COMMITTER_EMAIL=\"committer@email\" \\\n      GIT_COMMITTER_DATE=\"2005-05-26 23:30\" \\\n-     TZ= git-commit-tree `cat treeid` >commitid 2>/dev/null'\n+     TZ=GMT git-commit-tree `cat treeid` >commitid 2>/dev/null'\n\n test_expect_success \\\n     'read commit' \\\ndiff --git a/t/t5000-tar-tree.sh b/t/t5000-tar-tree.sh\n--- a/t/t5000-tar-tree.sh\n+++ b/t/t5000-tar-tree.sh\n@@ -41,7 +41,7 @@ test_expect_success \\\n      find a -type l | xargs git-update-cache --add &&\n      treeid=`git-write-tree` &&\n      echo $treeid >treeid &&\n-     TZ= GIT_COMMITTER_DATE=\"2005-05-27 22:00:00\" \\\n+     TZ=GMT GIT_COMMITTER_DATE=\"2005-05-27 22:00:00\" \\\n      git-commit-tree $treeid </dev/null >.git/HEAD'\n\n test_expect_success \\\n@@ -50,7 +50,7 @@ test_expect_success \\\n\n test_expect_success \\\n     'validate file modification time' \\\n-    'TZ= tar tvf b.tar a/a |\n+    'TZ=GMT tar tvf b.tar a/a |\n      awk \\{print\\ \\$4,\\ \\(length\\(\\$5\\)\\<7\\)\\ ?\\ \\$5\\\":00\\\"\\ :\\ \\$5\\} \\\n      >b.mtime &&\n      echo \"2005-05-27 22:00:00\" >expected.mtime &&\n"}]}