From d35ab3fa597eff866b07b56437cecd9afc6ec3e3 Mon Sep 17 00:00:00 2001 From: Ed Maste Date: Thu, 22 Dec 2016 20:15:14 -0500 Subject: 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 Signed-off-by: Holger Levsen --- bin/reproducible_freebsd.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'bin/reproducible_freebsd.sh') 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 "=============================================================================" -- cgit v1.2.3-54-g00ecf