chiark / gitweb /
test suite: debchange: Work around faketime TZ bug
[dgit.git] / tests / tstunt / debchange
1 #!/bin/sh
2 set -e
3
4 spec=$(date --rfc-3339=seconds -d @"${GIT_AUTHOR_DATE% *}")
5 spec=${spec%+*}
6
7 # The nonsense with TZ is to work around #907264
8 tz_set=${TZ+set}
9 if ! test "$tz_set"; then tz_undef=-u; fi
10
11 set -x
12
13 env TZ=UTC \
14 faketime -f "$spec" \
15 env $tz_undef TZ${tz_set:+=}"$TZ" \
16 "${DGIT_TEST_REAL_DEBCHANGE-debchange}" "$@"