commit 3a6b87604592c583079227ea995f50eb3ec74121 from: Christian Weisgerber date: Tue Aug 31 19:18:37 2021 UTC use the POSIX-compliant "date -u" command to return UTC time; ok stsp commit - dc8256b60dd076b61c44c4cf547127149bb6b15c commit + 3a6b87604592c583079227ea995f50eb3ec74121 blob - 4ea275e5c76c7bf5857b668c2aafc70d29162dd3 blob + cfed5721b9edd249a44ddebe704e3b23d22c9ffa --- regress/cmdline/commit.sh +++ regress/cmdline/commit.sh @@ -1399,7 +1399,7 @@ EOF fi local author_time=`git_show_author_time $testroot/repo` - d=`env TZ=UTC date -r $author_time +"%a %b %e %X %Y UTC"` + d=`date -u -r $author_time +"%a %b %e %X %Y UTC"` echo "-----------------------------------------------" > $testroot/stdout.expected echo "commit $head_rev (master)" >> $testroot/stdout.expected echo "from: $GOT_AUTHOR" >> $testroot/stdout.expected @@ -1438,7 +1438,7 @@ EOF fi local author_time=`git_show_author_time $testroot/repo` - d=`env TZ=UTC date -r $author_time +"%a %b %e %X %Y UTC"` + d=`date -u -r $author_time +"%a %b %e %X %Y UTC"` echo "-----------------------------------------------" \ > $testroot/stdout.expected echo "commit $head_rev (master)" >> $testroot/stdout.expected blob - 7de2767444a19ea67be04143f1677a1e6e9a08d7 blob + 94c4666f4c3fa7f4e45eecdd414195948ed5958b --- regress/cmdline/histedit.sh +++ regress/cmdline/histedit.sh @@ -152,9 +152,9 @@ test_histedit_no_op() { # We should have a backup of old commits (cd $testroot/repo && got histedit -l > $testroot/stdout) - d_orig2=`env TZ=UTC date -r $old_author_time2 +"%a %b %e %X %Y UTC"` - d_new2=`env TZ=UTC date -r $new_author_time2 +"%G-%m-%d"` - d_orig=`env TZ=UTC date -r $orig_author_time +"%G-%m-%d"` + d_orig2=`date -u -r $old_author_time2 +"%a %b %e %X %Y UTC"` + d_new2=`date -u -r $new_author_time2 +"%G-%m-%d"` + d_orig=`date -u -r $orig_author_time +"%G-%m-%d"` cat > $testroot/stdout.expected < $testroot/stdout) - d_orig2=`env TZ=UTC date -r $orig_author_time2 +"%a %b %e %X %Y UTC"` - d_new2=`env TZ=UTC date -r $new_author_time2 +"%G-%m-%d"` - d_0=`env TZ=UTC date -r $commit0_author_time +"%G-%m-%d"` + d_orig2=`date -u -r $orig_author_time2 +"%a %b %e %X %Y UTC"` + d_new2=`date -u -r $new_author_time2 +"%G-%m-%d"` + d_0=`date -u -r $commit0_author_time +"%G-%m-%d"` cat > $testroot/stdout.expected < $testroot/stdout @@ -184,11 +184,11 @@ test_tag_list_lightweight() { tag_id=`got ref -r $testroot/repo -l \ | grep "^refs/tags/$tag" | tr -d ' ' | cut -d: -f2` local tagger_time=`git_show_author_time $testroot/repo $tag` - d1=`env TZ=UTC date -r $tagger_time +"%a %b %e %X %Y UTC"` + d1=`date -u -r $tagger_time +"%a %b %e %X %Y UTC"` tag_id2=`got ref -r $testroot/repo -l \ | grep "^refs/tags/$tag2" | tr -d ' ' | cut -d: -f2` local tagger_time2=`git_show_author_time $testroot/repo $tag2` - d2=`env TZ=UTC date -r $tagger_time2 +"%a %b %e %X %Y UTC"` + d2=`date -u -r $tagger_time2 +"%a %b %e %X %Y UTC"` got tag -r $testroot/repo -l > $testroot/stdout