faketime's CLI does not permit correct unparsing of times in arbitrary
timezones. So we must save and restore TZ.
See #907264.
Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
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
+
+env TZ=UTC \
faketime -f "$spec" \
+env $tz_undef TZ${tz_set:+=}"$TZ" \
"${DGIT_TEST_REAL_DEBCHANGE-debchange}" "$@"