summaryrefslogtreecommitdiffstats
path: root/bin
diff options
context:
space:
mode:
authorEd Maste <emaste@freebsd.org>2016-12-22 20:15:14 -0500
committerHolger Levsen <holger@layer-acht.org>2016-12-23 02:20:43 +0100
commitd35ab3fa597eff866b07b56437cecd9afc6ec3e3 (patch)
treeb612cff1d72e618725d02cc5ed963d45b62712f4 /bin
parenta125226e232752a32a921947b72d51eb852d0a9c (diff)
downloadjenkins.debian.net-d35ab3fa597eff866b07b56437cecd9afc6ec3e3.tar.xz
reproducible FreeBSD: use BSD-style date argument for future date
FreeBSD's date command does not understand the --set format. Signed-off-by: Ed Maste <emaste@freebsd.org> Signed-off-by: Holger Levsen <holger@layer-acht.org>
Diffstat (limited to 'bin')
-rwxr-xr-xbin/reproducible_freebsd.sh3
1 files changed, 2 insertions, 1 deletions
diff --git a/bin/reproducible_freebsd.sh b/bin/reproducible_freebsd.sh
index ed42686e..dcd48a92 100755
--- a/bin/reproducible_freebsd.sh
+++ b/bin/reproducible_freebsd.sh
@@ -142,7 +142,8 @@ for FREEBSD_TARGET in ${FREEBSD_TARGETS} ;do
fi
# set time forward 398 days and some
- $RSSH "sudo service ntpd stop ; sudo date --set='+398 days +6 hours +23 minutes' ; date"
+ FUTURE_DATE=$(expr $(date +%s) + 34410180)
+ $RSSH "sudo service ntpd stop ; sudo date -f %s $FUTURE_DATE ; date"
echo "$(date -u) - system is running in the future now."
echo "============================================================================="