diff options
Diffstat (limited to 'tests/tstunt/debchange')
-rwxr-xr-x | tests/tstunt/debchange | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/tests/tstunt/debchange b/tests/tstunt/debchange new file mode 100755 index 0000000..452b8c9 --- /dev/null +++ b/tests/tstunt/debchange @@ -0,0 +1,17 @@ +#!/bin/sh +set -e + +spec=$(date --rfc-3339=seconds -d @"${GIT_AUTHOR_DATE% *}") +spec=${spec%+*} + +# The nonsense with TZ is to work around #907264 +tz_set=${TZ+set} +if ! test "$tz_set"; then tz_undef=-u; fi + +set -x + +exec \ +env TZ=UTC \ +faketime -f "$spec" \ +env $tz_undef TZ${tz_set:+=}"$TZ" \ +"${DGIT_TEST_REAL_DEBCHANGE-debchange}" "$@" |